We have an outstanding bug involving OS 5 streaming sound, that I have narrowed down to GapiDraw. We'd appreciate if this could be investigated ASAP (and fixed if necessary) as we are otherwise ready to release a new game.
Here are two sample applications that demonstrate the bug:
Both are built using 3.01b, but the problem was present in 3.01 also.
Both do exactly the same thing: they play a loop of sampled PCM sound using SndStreamCreate and related functions. The only difference is that MusicTest is created without GapiDraw using CodeWarrior's wizard, and MinimalMusicTest is created using GapiDraw's Minimal sample.
Both applications play the sound loop on OS 5 streaming sound devices. The bug involves power off (either manual or auto), and only occurs on some devices.
On Tungsten T3 and Zire 72, if you power off, then when you power on, the sound may be garbled, and when you subsequently exit, you may receive an error.
This only occurs with MinimalMusicTest; MusicTest is fine.
This does not occur on other devices. For example, Tungsten E and Zire 71 are fine. There is no problem with power off even in the Minimal version.
Something in GapiDraw is triggering this bug, making it impossible to create even a minimal GapiDraw application with OS 5 streaming sound. It's not GapiVFS, because neither application uses it. It may be related to the way 3.01 enables auto power off (it didn't originally).
I can't easily debug this without the source code to GapiDraw. Johan (or anyone), please confirm this problem on your Tungsten T3 or Zire 72. Here are the projects for debugging:
The test code added to each is identical and is marked with TESTCODE.