[speex-dev] Speex, what container?
miguel.gomes at netcabo.pt
Thu Mar 4 08:26:15 PST 2004
The aplication that I am developing is like a sound recorder (goes directly to the soundboard and start capturing the sound and writing the file, using the directsound api). I'm already capable of writing to normal wav files but I wanted to encode the audio with speex to have smaller size (and still good quality).
How can I write the wav files with speex content using the ACM codec? (like windows sound recorder)
Do you think that it is much more complicated than just writing it with the ogg format?
Thanks a lot for your help.
De: owner-speex-dev at xiph.org em nome de Christian Buchner
Enviada: qui 04-03-2004 16:09
Para: speex-dev at xiph.org
Assunto: Re: [speex-dev] Speex, what container?
<p><p><p> > But using the ACM codec I just need to put the speex content into the wave file data chunk and then
> windows will play it?
Typically it is the application like for example Windows Sound Recorder that creates the AVI/WAVE file
and writes it to disk. After installing the ACM you can simply start recording with any application that
supports recording to WAVE files. Windows Sound Recorder, GoldWave come to my mind.
The packaging of speex frames into the data chunk is not trivial. It slightly more complicated than concatenating
individual speex audio frames. For efficiency, I grouped several audio frames into blocks. Depending on the
speex mode, these groups have different sizes. This minimizes bit padding loss. Also to be compatible with the
ACM you need to create a WAVEFORMATEX header that is exactly like in my ACM.
I recommend against using the Speex API to create wave files that try to be playable with the ACM.
Way too mouch trouble.
Of course you could write a program that talks directly to the ACM and then create the WAVE file based
on the data returned by the ACM (for example using the AVIFile API provided by Windows). But that
is quite complicated. Definitely more troublesome than if you just used using the native speex API and the
suggested ogg container format (see speexenc.c)
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7380 bytes
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040304/ed388d63/winmail.bin
More information about the Speex-dev