Hello, On the Windows platform, I would like to compile a version of the codec files ogg.dll, vorbis.dll, and vorbisfile.dll that are small. I notice that the provided Windows projects are very large...the release Vorbis.dll is > 1 mb. To me, that is huge. I am only using decoding features. I looked in the Zinf project, and they seem to have a version with the encoding functions removed...where is the source for this? Do I have to create a separate project that takes these out. I don't get why it isn't included, or where it can be found or what was done. (As well, is there a decent sample of hooking DirectSound to the Vorbis? For example, how to translate the input values to a WaveFormatEX structure, etc...) (As well, what is the purpose of the Windows SDK project? It seems kind of confusing. There is no documentation on how it was compliled, with what debug, what settings...I don't trust it. Its just kind of sitting out there...with documentation copied from libvorbis project)
On Mon, Sep 27, 2004 at 11:26:52AM -0400, Greg Rezansoff wrote:> Hello, > > On the Windows platform, I would like to compile a version of the codec files ogg.dll, vorbis.dll, and vorbisfile.dll that are small. I notice that the provided Windows projects are very large...the release Vorbis.dll is > 1 mb. To me, that is huge. > > I am only using decoding features. >I recommend you use the static oggvorb library. If you use the static oggvorb libraries, your program will only contain the oggvorb code you use. I use the static *.lib files and the sound portion of my program is tiny.> I looked in the Zinf project, and they seem to have a version with the encoding functions removed...where is the source for this? Do I have to create a separate project that takes these out. > I don't get why it isn't included, or where it can be found or what was done. >> (As well, is there a decent sample of hooking DirectSound to the Vorbis? For example, how to translate the input values to a WaveFormatEX structure, etc...) >as for direct sound, I recommend you get the DirectX SDK at http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp and start reading the documentation. I can send you my code for playing OGG (and WAV) files using directsound if you like, (released under LGPL).> (As well, what is the purpose of the Windows SDK project? It seems kind of confusing. There is no documentation on how it was compliled, with what debug, what settings...I don't trust it. Its just kind of sitting out there...with documentation copied from libvorbis project)The oggvorb windows SDK is just a binary compilation of oggvorbis. I use it because it is simple (don't have to compile my own version of oggvorb). You might have to configure your linker to /IGNORE certain c runtime libraries (if the compilation of oggvorb is not linked with the same c runtime you link your project with)> > > > > > > > _______________________________________________ > Vorbis mailing list > Vorbis@xiph.org > http://lists.xiph.org/mailman/listinfo/vorbis >-- michaels@sdf.lonestar.org
Thank you very much your help! Using the static library is probably the best idea to shrink it right down. 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;) I am trying to find a Windows project that decodes OGG and they plays it to see an example. If you have some snippets of playing OGG using DS or Wave functions that would be great. To read and decode appears I need ogg.dll, vorbis.dll, and vorbisfile.dll...is this correct? I don't yet even understand the separation of concerns between OGG.dll, and vorbis.dll. I will have to study the API to understand it I suppose (not in the docs) Thanks again! Greg
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 :-/