View Full Version : How to mute key beep sound?
torija
04-29-2002, 11:59 PM
I hope to know how to mute key beep sound.
And What I implement is, when pressing key, a specific sound (mp3 or mmf... ) should be played.
I impleneted it. but it sounds after a little delay.
Is there a way to sound it immediately?
Kevin
05-06-2002, 12:14 PM
I am unable to reproduce such behavior, and am able to play various tones, when keys are pressed without delay. If you would like to post some sample code I may be able to help you further.
porneL
07-31-2003, 10:28 AM
I have the same problem, pressing a key on t720 creates a beep, and during that beep program is freezed. This makes 0.5 sec delay after each keypress and makes all action games unplayable!
How to make BREW pass the event immediately? Without doing this beep (or atleast doing it asynchronously, like other phone software)?
flarb
07-31-2003, 12:49 PM
As far as I know, you can't. The T720 has horrible key response times.
No, it's ok as soon as you loop using a timer..
porneL
07-31-2003, 01:11 PM
I use timer events for looping (fixed framerate) and thats probably the reason of freeze - timer event must wait while key event is processed.
did anyone managed to archieve better (heh.. tolerable...) response time on t720?
flarb
07-31-2003, 01:15 PM
The thing about the T720 is it seems that if you just tap the key you get ok reponse. But if you hold it down, it doesnt' seem to send the initial KEY_PRESSED message until it has been held down for a few seconds.
In my latest game, the frame draw time is fairly long--you could theoretically tap a key and release it before it is finished drawing the screen. My solution was to keep a stack for key presses--and whenever a key press event was sent, I pushed it on the stack. When I came to the frame logic in the next iteration of the timer, I just popped the input off the stack. Works fine.
But, I still have issues with holding down keys.
I have instant response in my game using timers.. (well, 1ms timer ;)
I use two keys buffer, lets say inputBuffer and newInputBuffer, each bit corresponds to a key.
When i receive a EVT_KEY_PRESS message, i update the the two buffers (just an easy or)
When i receive a EVT_KEY_RELEASE, i just update newInputBuffer (mask to remove the bit)
So basically:
GameLoop:
int32 keys = app->inputBuffer;
// process ...
app->inputBuffer = app->newInputBuffer;
return TRUE;
this way i get rid of weird side effects (key press and release processed at the same time). My game play the sounds directly, no probs..
Hope this will help
/kUfa
Marcel
08-01-2003, 09:05 AM
You may try to use AVK_KEY and AVK_KEY_RELEASE instead AVK_KEY_PRESS and AVK_KEY_RELEASE..
never had any problem using AVK_KEY instead AVK_KEY_PRESSED
I´m not sure, but I guess I read in a some doc, maybe a device sheet that AVK_KEY_PRESSED is not supported, or may not be supported by some phones...
Anyway when I tried to do such thing I started using AVK_KEY_PRESS I began to have problems too, I suggest you give a try to AVK_KEY
flarb
08-01-2003, 09:10 AM
I think KEY_HELD is the one that's not always supported.
vBulletin v3.0.13, Copyright ©2000-2009, Jelsoft Enterprises Ltd.