# Audio libraries

**URL:** <https://www.ruby-forum.com/t/audio-libraries/178047>\
**Category:** Ruby\
**Created:** [October 28, 2009, 2:42pm UTC](https://www.ruby-forum.com/t/audio-libraries/178047 "2009-10-28T14:42:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnnybutler7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Post date:** [October 28, 2009, 2:42pm UTC](https://www.ruby-forum.com/t/audio-libraries/178047/1 "2009-10-28T14:42:19Z")

</div>

I’ve seen this question thrown around a bit already, but I have yet to  
find a conclusive answer. Anyway, I’m looking for an audio library that  
I can use for a media player. So far I’ve tried gstreamer (ruby  
bindings) which didn’t even run the examples. I’ve considered Rubygame,  
which I believe uses SDL underneath. The problem with it is it has a set  
list of codecs it can use. I can use C++ if it is necessary. However, I  
would like something that can easily integrate with Gtk in ruby for  
video in the future, so I’m not really sure how that would work. Any  
ideas would be appreciated.

---

<div class="post-metadata">

**Author:** ![johnnybutler7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Post date:** [October 30, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/audio-libraries/178047/2 "2009-10-30T21:18:37Z")

</div>

2009/10/28 John B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I’ve seen this question thrown around a bit already, but I have yet to  
> find a conclusive answer. Anyway, I’m looking for an audio library that  
> I can use for a media player. So far I’ve tried gstreamer (ruby  
> bindings) which didn’t even run the examples. I’ve considered Rubygame,  
> which I believe uses SDL underneath. The problem with it is it has a set  
> list of codecs it can use. I can use C++ if it is necessary. However, I  
> would like something that can easily integrate with Gtk in ruby for  
> video in the future, so I’m not really sure how that would work. Any  
> ideas would be appreciated.

If you also want video then gstreamer might be actually good choice,  
it’s supposed to support video as well.

There are very few things that support pluggable codecs like gstreamer  
does so your choice is limited if you do not want to deal with  
integrating each and every codec yourself.

The other thing that comes to mind is jack.

If the interface is sane you can probably get some simple FFI bindings  
done quite fast when there are no existing working bindings.

You can also use a cheat: embed mplayer into your gtk app (see the  
mplayer wid and slave options). The supported codecs are set here as  
well but it plays almost anything.

Thanks

Michal
