Jump to content
  • Advertisement
Sign in to follow this  
synth_cat

how exactly to setup Ogg?

This topic is 3645 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

Hello all, I want to use the Ogg format in my game in order to reduce download size. Thus I need to integrate the Ogg/Vorbis library (or just Ogg?) into my current project, which is being made in VC++2005 Express. I went over to the Ogg Vorbis site. I could not find anything listed as an "SDK." Instead I only found libogg-1.1.3.zip and libvorbis-1.2.0.zip. I downloaded these, but they don't seem to contain what I'm looking for. Neither folder has any .lib's in it. Am I supposed to actually make my own .lib files using the C files in these folders? Or is there a "real" Ogg Vorbis SDK out there that I haven't managed to find yet? Forgive me - I've never actually used a third-party library before (besides DirectX.) I'm just a little bewildered about what I'm supposed to do next. Thanks, Greg

Share this post


Link to post
Share on other sites
Advertisement
All I really need to do is get raw data out of .ogg files, which means all I really need is the ogg_read() function, or whatever it's called.

Is it OK for me to just rip the code out and put it in my own source, even though my project is commercial?

Share this post


Link to post
Share on other sites
There are project and batch files under the win32 folder, use them to build your libs.

I believe the Ogg license allows you to statically link for commercial/closed source projects, however its still better to compile the library and link to it rather than dumping the source files into your project.

Share this post


Link to post
Share on other sites
Thanks for pointing that out - I found them!

However, I'm not exactly sure what's supposed to happen now (I'm pretty uncomfortable with .bat files - this thread should probably have been in For Beginners.)

Here's build_ogg_static.bat:


@echo off
echo ---+++--- Building Ogg (Static) ---+++---

if .%SRCROOT%==. set SRCROOT=i:\xiph

set OLDPATH=%PATH%
set OLDINCLUDE=%INCLUDE%
set OLDLIB=%LIB%

call "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat"
echo Setting include paths for Ogg
set INCLUDE=%INCLUDE%;%SRCROOT%\ogg\include
echo Compiling...
msdev ogg_static.dsp /useenv /make "ogg_static - Win32 Release" /rebuild

set PATH=%OLDPATH%
set INCLUDE=%OLDINCLUDE%
set LIB=%OLDLIB%



I double-clicked the file and nothing happened.

I checked the 'call' directory and there is no "vc98" folder in the microsoft visual studio directory. Do I need to change the .bat instructions because I am using VC++2005 Express?

It seems to me like this .bat is written to be used with an older version of Visual Studio. But, since I don't really understand what this .bat file is doing (I've never used Visual Studio from the command line before) I'm not sure what changes to make.

Share this post


Link to post
Share on other sites
Just double click on the .dsw file, VC++2005 Express will pop up asking you if you want to convert and open the project, say "Yes to all", from there I am sure you can figure out what to do.

Share this post


Link to post
Share on other sites
I tried running build_ogg_static.bat from the command line - here's the output I got:

Quote:

C:\Documents and Settings\Student\Desktop\libogg-1.1\win32>build_ogg_static
---+++--- Building Ogg (Static) ---+++---
The system cannot find the path specified.
Setting include paths for Ogg
Compiling...
'msdev' is not recognized as an internal or external command,
operable program or batch file.


I heard someone say that the folder libvorbis-1.0.1 on the xiph site contained already-compiled source. However, this folder does not have any libs or dlls in it. So that didn't really get me any farther.

Share this post


Link to post
Share on other sites
Quote:
Original post by synth_cat
Oh, sorry Kwizatz - I didn't realize you had just posted. - I'll come back once I've had a look at that .dsw file.


No problem, I noticed the batch files are quite outdated (as is the VS project) after I made my initial post, sorry about that, I usually compile these things with MSYS, so I had not done with VS2005/VS2008.

Share this post


Link to post
Share on other sites
I may be being slightly naive here, but can you not just use SDL_Mixer to accomodate OGG into your game...then download a conversion tool e.g. Audacity to convert your mp3 to OGG?

Share this post


Link to post
Share on other sites
Sorry to bring this up again, but does anyone know where I can find ogg.dll, vorbisfile.dll, etc.? I can't find them on the oggvorbis site - just source code. I can come across the oggvorbis-win32sdk.zip file on other places online, but I'm not sure which places are "safe."

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!