PocketMatrix forums

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

sound format?

alex|levelone| · 22 Apr 2002, 06:39 UTC
I can build and start the sound sample programm, but i am not able to play my own wav files.
My waves seem to be in the same format,
expect the cbalign member, it is set to one, the sample sounds cbalign member is 2.

Any ideas what is going wrong? I have an Ipaq 3870.

thanks
The sound loading (and decompression) is done throught the ACM API.

I am not sure what you are describing, what is the "cbAlign" field? Are you talking about the "nBlockAlign" member of the WAVEFORMATEX structure?

If so, it is supposed to be set to "nChannels * wBitsPerSample / 8"... But again, this should be handled by the ACM API.
alex|levelone| · 22 Apr 2002, 13:09 UTC — sound prob fixed ;)
my fault, nBlockAlign of course.
I found the problem,...
acmStreamConvert() in sound.cpp failed because the wavefile was to big. After truncating it down to 135 kb (from 600kb) it was played. The second wave file was written with a wrong waveheader. The header described a file as a 16-bit Mono wave, the data itself was organzied in 2 8-Bit channels. Dunno why my Desktop PC and the PocketPC could playback the file 8O

:idea: The best sound format i guess is 11025Hz 8 Bit Mono. Waves larger than 100kB should be streamed.
So there is a limit to the size of the WAV when using ACM? How did you figure this out?
Just try and error :)
On a large wavefile, acmStreamConvert() returned 0x800659e8 .

I couldnt figure out what thats means.