Home » Community » Forums » » Introduction to Ogg Vorbis
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic

Page:   1 2 »»

 Last Thread Next Thread 
 Introduction to Ogg Vorbis
Post Reply 
nice article easy to understand

 User Rating: 1053   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Great article. I am curious. Did you measure performance compared to mp3 ?

- Wolf

 User Rating: 1469   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Thanks.

I haven't done a formal comparison myself, but judging
from the latest WinAMP 5 (which supports MP3, OGG, among
other formats), I'd say the difference is indistinguishable.
The CPU usage hovers around 0% - 2% on my computer, when
playing both formats.




Kami no Itte ga ore ni zettai naru!

 User Rating: 1124   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

hm, well, you are using some "&bitStream" in the code, which isn't mentioned before (not a big thing, these things just do catch my eyes, an experienced programmer is always suspisious about undeclared/uninitialized variables ).

And the second thing I didn't fall in love with is: you are giving OggVorbis library the "FILE f". While this probably makes code shorter and cleaner, most of programmers do use 'datafiles', so they prefer to pass data to other libraries in char arrays. They have to read them from datafile by their custom "fread". I'm al most sure the OggVorbis can decode sound from char array instead of file, so anyone can do this. But I would prefer the example in article already working in this way. (just a matter of personal preference)

Anyway, nice article.

 User Rating: 1015    Report this Post to a Moderator | Link

Ah well, I wanted to keep the article to a very simple level.

Explaining bitStream is a little more advanced than I'd like.
You don't need to mess with it when dealing with files that
were ripped from a CD, for example. Likewise, the use of
FILE * is to keep things easy to understand.

You're absolutely right about using custom I/O functions to
read the OGG data. I myself use some iostream-based functions
to perform the I/O in my engine code.

It's jut that these are more advanced techniques that don't
mix well with introduction materials.

If the article whetted your appetite with Ogg Vorbis, then
by all means study the SDK and do what you want with it.



Kami no Itte ga ore ni zettai naru!

 User Rating: 1124   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

You could've also mentioned this as reference:

http://www.devmaster.net/articles/openal-tutorials/lesson8.php

 User Rating: 1015    Report this Post to a Moderator | Link

Well, sure, I *could* have mentioned it, if I knew it existed
in the first place... Hmm...



Kami no Itte ga ore ni zettai naru!

 User Rating: 1124   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I like the article as well. But I am haing problems with it. When I try to put it in my own code I get an error the instant that I call ov_open. Windows gives me a box saying that something could not be 'written' and kills my program. The following is the code that I am using. What am I doing wrong?

file = fopen(Filename, "rb");
int result;
result = ov_open(file, &oggFile, NULL, 0); // Dies right here.

It doesn't even finish processing the function so it so I can't even receive an error return. If any can help that would be so helpful. Thanks.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I'm having the same problem as Running_Wolf. The program crashes during ov_open, the only debug info I get is:

VORBISFILE! 00329bfa()

which doesn't mean much to me. Any help would be great.

thx
nic

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I suspect incompatible compiler settings in the Ogg Vorbis
DLL and your program. In particular, make sure that they
both use the DLL version of the CRT library.

i.e. Use "Multithreaded DLL" for release build and "Multithreaded
Debug DLL" for debug build.




Kami no Itte ga ore ni zettai naru!

 User Rating: 1124   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Just an implementation question here -- I see that the example program simply loops to wait for the 'end playing' status to change.

What can and should be done for a real game for sound system architecture? using SDL as an example, I was envisioning a CSoundManager object running in a separate thread. Therefore, the basic init would look something like:

SoundMgr->init();
SoundMgr->run();
SoundMgr->shutdown();
 


And within the run() function would be a basic loop which polls a command queue
void CSoundMgr::run()
{
	bool exitLoopFlag = false;
	
	while (!exitLoopFlag)
	{
		// poll queue for any commands
		// action any incoming requests to play / stop sound
	}
	
}
 


My problem with this is that it's using a continuous polling mechanism rather than simply waiting for a callback. How can I implement it as such? Thread work is new to me.

[edited by - d0hboy on January 5, 2004 1:52:30 PM]

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Yeah, the problem was incompatible DLL's. If I use the vorbisfile_static.dll, instead of vorbisfile.dll it works great.

thx

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I tried this as well, but I'm getting compiler errors I can't seem to get rid of.

It can't find ov_open, ov_info, ov_read and ov_clear functions.

Which lib should I use and how do I tell my program that (VS7)?

 User Rating: 1494   |  Rate This User  Send Private MessageView ProfileView JournalView GD Showcase Entries Report this Post to a Moderator | Link

quote:
Original post by nic_t
Yeah, the problem was incompatible DLL's. If I use the vorbisfile_static.dll, instead of vorbisfile.dll it works great.

thx


Ack, where can I get vorbisfile_static.dll? The SDK I downloaded came with vorbisfile.dll and vorbisfile_d.dll. Neither of these seem to work right.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I'm getting the same problem where the application (both the sample app and my own app) bail with a system error as soon as ov_open is called.

What has anyone figured out is causing this? I'm simply using the DLL's and LIB's supplied from the Ogg Vorbis site.

 User Rating: 1015    Report this Post to a Moderator | Link

FIXED! Yeah OGG is now by bitch.

Ok people, here's what I did to make this work. For libs, use:
ogg_static.lib vorbis_static.lib vorbisfile_static.lib

Then change your project to "MultiThreaded":
Alt-F7, C++, Code Generation, Use Run-Time Library Multithreaded.

Then you'll be set. The only "downside" is you add about 110K to your app for the static libs, but it's actually more of a plus because now you don't have to worry about installing OggVorbis on the person's machine.

 User Rating: 1015    Report this Post to a Moderator | Link

ok..i try to run certain programs on my computer, such as halo,but i get a window that says the application has failed to start because vorbisfile.dll was not found. It suggests to re-install application but i would like to know what the "vorbisfile.dll" is. Can any one help me?


 User Rating: 1015    Report this Post to a Moderator | Link

Yes the same exact thing has happened to me with halo also!!!

 User Rating: 1015    Report this Post to a Moderator | Link

So what ever happened to that anti-necro feature of the "new" forums?

 User Rating: 1664   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Funny you mention Halo because I wrote the PC audio engine for Halo ;) If Halo is complaining about vorbisfile.dll missing then the file is actually missing from the Halo directory or your .dll is the incorrect version.

vorbisfile.dll contains functionality for using Ogg data by providing functions such as ov_open (open an .ogg file from disk), ov_opencallbacks(this was used in Halo because all of our Ogg sounds were streamed from memory), ov_read(read an amount of Ogg data), and etc.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by C-Junkie
So what ever happened to that anti-necro feature of the "new" forums?
It's there, but enabled on a per-forum basis. It doesn't make sense to have it active in the article feedback forum.

 User Rating: 2088   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Quote:
Original post by nic_t
I'm having the same problem as Running_Wolf. The program crashes during ov_open, the only debug info I get is:

VORBISFILE! 00329bfa()

which doesn't mean much to me. Any help would be great.

thx
nic


 User Rating: 1015    Report this Post to a Moderator | Link

Im not a programer, and know nothing of code. Where can I find this .dll and if i ever do find it where do i have to put it. Is there a patch that fixes this or something.
-[silver]777

 User Rating: 1015    Report this Post to a Moderator | Link

I`ve read the source and still NOT figured out how to use the .DLL`s, coming with oggvorbis-win32sdk.zip . I couldn`t see a call to LoadLibrary() and then GetProcAddress() or even a pointer to function definition.... :-(

 User Rating: 1015    Report this Post to a Moderator | Link
Page:   1 2 »»
All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: