• Advertisement
Sign in to follow this  

Audio Lib

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

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.

Share this post


Link to post
Share on other sites
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...)

Share this post


Link to post
Share on other sites
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'.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
The problem with SFML is that it doesn't work right on 64-bit operating systems. (Or at least it didn't work on my x86-64 version of Fedora Linux.)

The RW_ops function of SDL is built-in to the main library while SDL_mixer accesses it from there. The problem is that it will only play mono .OGGs through the main channels. The music channel does fine with stereo .OGG files.

Share this post


Link to post
Share on other sites
It should work on 64 bit systems. Did you try asking on the SFML Forum? Laurent (the main developer) is always very helpful.

Share this post


Link to post
Share on other sites
Quote:
Original post by yahn
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.


Nope, Audiere is perfectly able to play sound from memory, network or whatever else you can think of.

In addition to that you don't even have to place the whole sound into memory at once, Audiere can ask you whenever it needs additional data, allowing sound to be stream bit by bit from a .zip archive or a socket with limited bandwidth.

Audiere has a class audiere::File. You simply derive from that and implement the read(), seek() and tell() methods yourself to work on a chunk of memory or whatever you're using. Audiere will call read() whenever there space in its audio buffer that it needs to fill.

Share this post


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

  • Advertisement