Page 1 of 1

sound format?

PostPosted: Apr 22, 2002 @ 7:39am
by alex|levelone|
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

PostPosted: Apr 22, 2002 @ 7:58am
by Kzinti
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.

sound prob fixed ;)

PostPosted: Apr 22, 2002 @ 2:09pm
by alex|levelone|
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.

PostPosted: Apr 22, 2002 @ 5:44pm
by Kzinti

PostPosted: Apr 30, 2002 @ 11:20pm
by Guest
Just try and error :)
On a large wavefile, acmStreamConvert() returned 0x800659e8 .

I couldnt figure out what thats means.