Sorry... my bad.

I was generating a custom key event, and didn't add the appEvtHookKeyMask to
the Modifier mask. That's what tells the PalmOS to *not* play a keyclick. I
knew that...

Sorry again.

- John

// Modifier code sent (same as commandKeyMask)
// Note -- MUST include appEvtHookKeyMask or PalmOS generates a
// 'click' sound (ie, a keyclick) -- very annoying!
#define ESquirtModifier (0x0008 | appEvtHookKeyMask)


static void SIRWake (DWord) {
        EvtEnqueueKey (ESquirtKeyChr, eSquirtSirReady, ESquirtModifier); 
}

-----Original Message-----
From: Schettino, John [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 21, 2001 2:49 PM
To: Palm Developer Forum
Subject: Phantom "Click" sound being played... by the system?


Here is an odd behavior I cannot seem to track down...

I have a app that uses the old serial manager code, "back door" methods to
do event-based reads of the serial port:

        if (sirRefNum == sysInvalidRefNum) {
                err = SysLibFind ("Serial Library", &sirRefNum);
                if (err) return;
                 
                err = SerOpen (sirRefNum, 0, 9600);
                if (err && (err != serErrAlreadyOpen)) {
                        sirRefNum = sysInvalidRefNum;
                        return;
                }

                // We're going to use a Wakeup Handler
                // instead of polling for input
                SerSetWakeupHandler(sirRefNum, SIRWake, 0);
                SerPrimeWakeupHandler(sirRefNum, 1);
        }


Now for the weird part... When this code runs, the Palm device (several that
I've tested including Palm IIIc/ 3.5os, pdQPhone/3.0x, VII/3.2) there is a
soft "tick" sound (ie, SndPlaySystemSound(sndClick)) played *every time* the
code above is executed. Commenting out the SerSet/SerPrime calls gets rid of
the sound, but also renders the program non-functional.

Where is that sound comming from, and how do I get rid of it?

- John Schettino


-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to