[Vorbis] Size of Windows ogg.dll and vorbis.dll

Greg Rezansoff grezansoff at ipdevco.com
Mon Sep 27 10:39:44 PDT 2004


This definitely helps.

Actually, I already have code sames for buffer handling for DS/wave packets, and  you are correct, it is complex. However, for me the unknown part was using the codec and setting up the Windows project properly. 

Oops...yes I meant *_static.lib  I typed DLL by mistake...the dyslexia is kicking in;)

(BTW, this is a super interesting project...I have a feeling I will be learning a lot.)

Thanks again! 


> As for the coding, the most tricky part seems to be converting the native OGG info into a WaveFormatEX structure that Windows or DS can understand.  Its not that big of a deal, but if someone already did it, I can at least follow the example via cut and paste;)
> 
> If you have some snippets of playing ogg in DS that would be great.
> 
> If I want to read a file, it appears I need ogg.dll, vorbis.dll, and vorbisfile.dll...is this correct?
> 
> Thanks again!
> Greg
> 

You'll need ogg_static.lib vorbis_static.lib and vorbisfile_static.lib
if you're using the static library.
also ogg_static_d.lib ... for debug


the WaveFormatEX structure is just for creating the sound buffer.. use the values returned by ov_info to get the information needed, then convert that to windows WaveFormatEX and create a sound buffer with it.

After you've created the sound buffer is the hard part :-)


The most difficult part of playback is probably filling the sound buffer with decoded data in your main decoding loop. For example: every frame your decoder must check the write pointer for the sound buffer, and then fill the sound buffer with PCM data if needed. You'll probably want to keep a good amount of decoded data ahead of the write pointer so the playback doesn't skip.. It takes awhile to get right and a lot of experimentation.

not sure if this helped :-/


More information about the Vorbis mailing list