Jump to content
  • Advertisement
Sign in to follow this  
V-man

Decompressing ogg files

This topic is 4525 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm a first time user of the ogg library (http://www.xiph.org/) I compressed a 55MB wav file, dual channel, 44KHz to a ogg file using oggenc.exe and then I tried to read the ogg, in other words, decompress into the PCM data. It is extremely slow. It takes >10 minutes on a Athlon XP 2800+ I tried oggdec.exe which converts back to .wav This was slightly faster for some reason, but again, it takes too long. The ogg files was about 3 MB. My code is very much like oggdec.exe They use a while loop and read blocks at a time and write to a .wav file. Any advice? Anyone with similar experience?

Share this post


Link to post
Share on other sites
Advertisement
It's very typical for the compression time of an Ogg file to be long. But why decompress it? Typically Ogg files are streamed to the mixer a little at a time like an MP3 file. Try playing back the Ogg file with WinAmp or write a small playback program using OpenAL or SDL_Mixer. You'll see that the file loads and decompresses as it plays.

Share this post


Link to post
Share on other sites
yes, ov_read sucks a lot of juice.
I suppose I could try streaming but that complicates things.
Thanks, I wanted to make sure it was normal.
Also, apparently, some sound cards can support ogg directly but I think most don't. It would be interesting if this was common.

PS: I had to compile ogg, vorbis and vorbisfile together as a static .lib for Win32.
If I make 3 dlls (ogg.dll, vorbis.dll, vorbisfile.dll), then it would crash in NTDLL.dll when I called ov_open. I traced the code and found that when fseek is called (from vorbisfile.dll I think), it crashed.
There is no coding error in the vorbisfile project. NTDLL.dll doesn't like it when a dll is calling fseek. I tried to compile with multithread and multithread DLL using VC++6
The default project settings was multithread.
I prefer multithread DLL.
Any ideas?

PPS: I am using OpenAL

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!