PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Playing sound on an iPAQ 3870 - Please Help!!

Pejo Software - Per · 03 May 2002, 18:29 UTC
I'm developing a game where I use PlaySound to play some wav files. The problem is that it seems to eat all processor time so that the graphics runs poorly. this problem only occurs on my iPAQ 3870 and not on my iPAQ 3600. Does anyone have a cure for this or knowledge of why playing sound is so much tougher on an iPAQ 3870 than on a iPAQ 3600.
i think this is a problem between ppc and ppc2002, as i have seen it happen not only with the playsound api (and on any ppc, not only the ipaq). When you build for your 3870, do you use the ppc2002 sdk or the normal ppc sdk?
I still have not figured out what is going on and why the problem is caused, but i will post the solution here if i find it.

cryo
Pejo Software - Per · 05 May 2002, 00:38 UTC
I have tested this in some different ways: On an iPAQ 3600 with PPC, on an iPAQ 3600 with PPC2002 and on an iPAQ 3870 with PPC2002. The result was that the performance (disturbance on my graphics updates) on the 3870 was much worse than on the 3600. the 3600 with PPC maybe performed just a little better than the one with PPC2002. I have also tested with PPC SDK and PPC2002 SDK and there wasn't any difference.
I did however find a way to make things work better (not good just better). I recorded silence to the end of my wave files causing them to be longer. Perhaps this could have something to do with process/thread switching or that the sound driver goes to some wait state (that is avoided when there are coming sounds all the time). But... I guess there is no point in guessing.
Here's something to try (I have no idea if this will actually help or not). Try creating a separate thread, then call sndPlaySound from that thread with the SND_SYNC flag.

Dan East