Tonight, I discovered that on the PalmOS, the following code does nothing:
        AttnDoSpecialEffects(kAttnFlagsSoundBit);
Now instinctively, I would have figured that it would play the alarm sound or something, but all I got was a whole lot of nothing.
At first I figured that I just had the system sound off, but even after I made sure that the system sound was on, it still did nothing. After some digging and a google search, I discovered that the kAttnFlagsSoundBit value doesn't actually do anything in this scenario. How strange! I didn't find it documented anywhere in the API docs or the Help files, but apparently, this is a known 'feature'.
To make things more obfuscated, if you use:
        AttnDoSpecialEffects(kAttnFlagsSoundBit | kAttnFlagsVibrateBit);
it will successfully vibrate. If kAttnFlagsSoundBit is a bogus value for this function, it should at least have the decency to error out in a big way if I pass invalid values to it! Anyway, I'm sure most people don't really care about this, but if you need a workaround, just use SndPlaySystemSound(sndAlarm) instead.
|