Page 1 of 1
Pocket PC 's sound

Posted:
Feb 22, 2003 @ 6:19pm
by JoJo
Dear all,
I am going to work on the sound effect of my first pocket pc. However, I have no experience on pocket pc's sound.
I tried to use waveOutOpen with parameter CALLBACK_EVENT but it seems that my function cannot feed data to buffer on time if it wait unit the event occur.
I also tried to use CALLBACK_OUT parameter, but the callback is not executed except the first block.
I read the source of Pocket Quark and it seems that it uses parameter CALLBACK_NULL. According to pocket pc 's document, it means no callback. How can I feed data to it if I have no callback function? I am very confused.
I have no experience on sound programming before and I wonder if someone can give me a pointer to sound of pocket pc.

Posted:
Feb 22, 2003 @ 6:52pm
by MirekCz

Posted:
Feb 22, 2003 @ 8:18pm
by fzammetti
Last post on this page by dillrye... has a link to ZapPow... this will answer all your questions, as it did for me. Very simple to follow source, nice and easy to understand.

Posted:
Feb 25, 2003 @ 7:00am
by v0101
FMOD is another sound engine to consider. Very easy to use and the same code will work on the desktop and Pocket PC.
Here's the site

Posted:
Feb 25, 2003 @ 7:35pm
by JoJo
Dear all,
Thanks a lot. I am going to study ZapPow first because it is the most simple one.
I think the other two are great too but I am just a newbie to sound, but I will turn to them once I finger out what ZapPow does.
I have a question on ZapPow and I am not fully understand. In cem_init of ZapPow, there is a argument - nBufferMS .
I find that the actual time interval is equal to :
nTimerInterval = (nBufferMS / NUM_BUFFERS) / TIMERS_PER_BUFFER_TIME;
where:
TIMERS_PER_BUFFER_TIME = 2
NUM_BUFFERS = 4
If I set nBufferMS to 200, it works fine.
However, there is "hiss" noise repeatly if I do following change.
TIMERS_PER_BUFFER_TIME = 1
NUM_BUFFERS = 4
nBufferMS = 100
It seems the nTimerInterval are same for both cases. I wonder if someone can tell me the difference of two cases.

Posted:
Feb 25, 2003 @ 8:18pm
by fzammetti
I'm trying to remember the sample, so take this with a grain of salt (probably a very large one!)...
It looks like what you write should be equivalent because in both cases nTimerInterval works out to 25ms, however, there is still the different in the mixing buffer size. As I recall, 200ms is about the smallest mix buffer you can have on most PPC's without problems (not sure why that is, but I think it's true).
So, although I don't frankly see what TIMERS_PER_BUFFER_TIME is for, the important value here, I think, is still nBufferMS, which you probably shouldn't set lower than 200. If you set it lower, the mixing buffer is too small and you wind up with audio artifacts, which you are hearing. I think pops and clicks are what usually occur, but hissing might be indicative of the same problem.
Did that help any?

Posted:
Feb 26, 2003 @ 12:07pm
by Dave H

Posted:
Feb 28, 2003 @ 6:04pm
by JoJo