|
||||||||||||||||||
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 |
|
![]() aboeing Member since: 1/11/2003 From: Perth, Australia |
||||
|
|
||||
| nice article |
||||
|
||||
![]() wolf XNA/DirectX MVP Member since: 1/8/2000 From: Carlsbad, CA, United States |
||||
|
|
||||
| Great article. I am curious. Did you measure performance compared to mp3 ? - Wolf |
||||
|
||||
![]() TangentZ Member since: 1/23/2002 From: Calgary, Canada |
||||
|
|
||||
| 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! |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| 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. |
||||
|
||||
![]() TangentZ Member since: 1/23/2002 From: Calgary, Canada |
||||
|
|
||||
| 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! |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| You could've also mentioned this as reference: http://www.devmaster.net/articles/openal-tutorials/lesson8.php |
||||
|
||||
![]() TangentZ Member since: 1/23/2002 From: Calgary, Canada |
||||
|
|
||||
| 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! |
||||
|
||||
![]() Running_Wolf Member since: 1/10/2001 |
||||
|
|
||||
| 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. |
||||
|
||||
![]() nic_t Member since: 12/28/2003 |
||||
|
|
||||
| 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 |
||||
|
||||
![]() TangentZ Member since: 1/23/2002 From: Calgary, Canada |
||||
|
|
||||
| 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! |
||||
|
||||
![]() d0hboy Member since: 2/19/2002 |
||||
|
|
||||
| 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] |
||||
|
||||
![]() nic_t Member since: 12/28/2003 |
||||
|
|
||||
| Yeah, the problem was incompatible DLL's. If I use the vorbisfile_static.dll, instead of vorbisfile.dll it works great. thx |
||||
|
||||
![]() rick_appleton Member since: 8/29/2002 From: Delft, Netherlands |
||||
|
|
||||
| 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)? |
||||
|
||||
![]() DJohnson Member since: 10/31/2002 From: USA |
||||
|
|
||||
quote: 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. |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| 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. |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| 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. |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| 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? |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| Yes the same exact thing has happened to me with halo also!!! |
||||
|
||||
![]() C-Junkie Member since: 8/3/2000 From: gopher:// |
||||
|
|
||||
| So what ever happened to that anti-necro feature of the "new" forums? |
||||
|
||||
![]() vatoloco Member since: 2/27/2002 From: Dallas, TX, United States |
||||
|
|
||||
| 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. |
||||
|
||||
![]() Myopic Rhino Staff Member since: The dawn of time
From: Temecula, CA, United States |
||||
|
|
||||
Quote:It's there, but enabled on a per-forum basis. It doesn't make sense to have it active in the article feedback forum. |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
Quote: |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| 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 |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| 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.... :-( |
||||
|
||||
|
Page: 1 2 »» All times are ET (US) ![]() |
Last Thread Next Thread ![]() |
|