Audio Lib

Started by
12 comments, last by Cygon 15 years, 8 months ago
I've been pretty determined to do everything myself using OpenAL, but it seems that I just face setback after setback. So, a while ago, I decided to start looking for an Audio Lib, but I can't find one that does what I need. For audio, all I need is a free lib that can play OGGs from memory. The SDL libs seem to be able to do this, but I've been unable to get RWoops (I think that is the name) to do this. Additionally, I'd prefer not to use SDL. I've used it in the past and, while it is very convenient, it just seems so bloated.
Advertisement
Quote:Original post by yahn
I've been pretty determined to do everything myself using OpenAL, but it seems that I just face setback after setback. So, a while ago, I decided to start looking for an Audio Lib, but I can't find one that does what I need.

For audio, all I need is a free lib that can play OGGs from memory.

The SDL libs seem to be able to do this, but I've been unable to get RWoops (I think that is the name) to do this. Additionally, I'd prefer not to use SDL. I've used it in the past and, while it is very convenient, it just seems so bloated.
You can play .ogg music files from memory using SDL_mixer. What sort of problems have you been having?

Also, why do you feel that SDL is 'bloated'? (It seems pretty clean and minimal to me...)
There are tutorials for loading oggs to play with OpenAL out there. I'm not sure if that is why you chose not use OpenAL or not, but I'm just sayin'.
Yes I use the tutorial that I'm fairly certain you are referring to. For one, the tutorial has two huge typos that took me nearly a week to figure out what was wrong and it did not work at all. For two, I don't know why, but when my processor is very busy something happens and it makes the sound skip until I restart the program. I've talked to close to 100 people and none of them seem to have this problem, but it is extremely annoying for me and I can't fix it. I have a feeling even though it doesn't happen for them, I'm not the only person that it's going to happen to.

Also, SDL_mixer is extremely slow when compared to OpenAL, correct? I cannot stress how much sound is involved in my game. I think I need to use OpenAL, so I'm more or less looking for a wrapper that does what I've already done, except doesn't have the skip bug.

I'm willing to try SDL_mixer, though. Also, does it play OGGs from memory natively? I used SDL_mixer probably 3 years ago and I could have sworn that you needed to use something called RWoops to play from memory and it wasn't working. Maybe I used another SDL audio lib.
I've suggested it before and I'm not shy about doing it again: BASS. It plays a bunch of music formats (including OGG) and it's very easy to use.
BASS is a very good library; however, BASS is not free nor does it play on Linux. Is it just me or is there not much to chose from?
You could try SFML, it has audio support (including playing of ogg files)

http://www.sfml-dev.org
Quote:Original post by yahn
BASS is a very good library; however, BASS is not free nor does it play on Linux. Is it just me or is there not much to chose from?

To correct this, from their website: "BASS is free for non-commercial use." I believe you're right about Linux though.
Also try Audiere!

- It's small,
- it's free,
- has a nice interface,
- plays back .mp3, .ogg, .flac and several .mod types,
- is cross-platform
- and it uses streams to read data (from memory, files or your own implementations)

Plus, you can get the sources too -- I made my personal x64 build thanks to this :)

Only drawback is that the Windows build uses DirectSound, not OpenAL.
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
I used Audiere before and really liked it. However, these libraries don't allow you to play sound form memory, correct? I feel like I have to be getting this wrong, but I searched the Audiere doc for quite some time and could never find a way to get it to play sounds from memory.

Additionally, I was thinking of using SFML, but I saw the same thing from there.

Am I wrong about all these libraries not being able to play from memory?

Edit: SFML DOES load sounds from memory. I'll look into that a lot more. Thank you for the suggestion. I could have sworn that it didn't.

This topic is closed to new replies.

Advertisement