With permission from Johan, I am posting this message inviting anyone interested to give me a hand to test my sound mixer.
In this first test I include a Windows and ARM executable. As soon as I have a few feedbacks on it, I'll provide the DLL with some samples and documentation.
Here is the link to the test:
http://www.techlogic.ca/aw/gapisound.exe
(1.6 MB, self-extracting, tested)
Oh, and guess what? It's called GapiSound

Ok, here are some instructions: run the file and extract its content anywhere on your harddrive. Go into the PC > PC_Test > Release directory, and run "Test.exe".
For your ARM based PocketPC, copy the PPC directory anywhere on your device, and run "Test.exe".
Here are the expected results: A basic application will start, after which you will hear a Duke Nukem babe say: "I'm all yours, Duke!". You will then hear Duke himself say: "So many babes, so little time!". Then music will start and a guy will speak on top of the music.
These four sounds are different format: ADPCM compression, OGG Vorbis compression, .IT module and PCM wave data. They are also at different rates. The mixer is set to 44100 hz, 16 bits, stereo.
Please report your results to me at efortier@techlogic.ca , here is what I need to know:
- Did the Windows version work? Was there any stutter or skips? Were the four sounds played?
- What is your PC sound card? (if known)
- Did the ARM PocketPC version works? Was there any stutter or skips? Were the four sounds played?
- Was the PocketPC application window with the words "LET'S ROCK!" properly shown?
- What is the brand and model number the PocketPC(s) device(s) you did the test on? (important)
For this test I used a fixed buffer count and size for the mixer, so if your device has a high sound letency it's possible that there will be some skips. This can usually be fixed by increasing the number or size of the buffers.
Here are some technical information on the mixer itself.
The mixer and IMA ADPCM code is all my own. Included is a mod player that can play .MOD, .IT, .XM. The mixer loader can load PCM, IMA ADPCM and OGG/Vorbis compressed sounds. It can either run with a built-in thread to mix the sounds continually, or you can include the "Mix()" function in your main loop.
The mixer also contains a streaming feature to let you play sounds without loading them all into memory. The mixer supports 11/22/44 Khz, 16/8 bits, mono/stereo. While "floats" are used to set the volume of the sounds and modules, these are converted into integers and no floats are used anywhere else in the mixer.
The OGG/Vorbis part is the Tremor v1.0 integer OGG implementation that can read (not write) any OGG encoded file. It provides compression comparable to MP3, without need for licensing.
The IMA ADPCM compression allows the use of 4 bits compressed sounds which also produce small file sizes.
The mixer features a "sound injection" feature neccessary for games. It lets the programmer load a sound once, and inject it any number of times into the mixer, even if the sounds overlaps itself.
There is no limit to the number of sounds that can be played simultaneously, however the more sounds playing, the larger the buffers and the more CPU power will be required to mix the sounds. On a 206 Mhz device, I have no problems playing 4-6 sounds at the same time, while keeping a good framerate.
The mixer uses standard waveOut() functions, and I've been careful in its implementation. So there shouldn't be too much problems in that area. (I hope!)
That's about it for now. I look forward to your comments, and if any of you have suggestions, please write them in this thread.
Thanks!
--Eric Fortier
PS: The mixer should also work correctly after you turn the device off then on
