# Audio Files length

**URL:** <https://www.ruby-forum.com/t/audio-files-length/192804>\
**Category:** Ruby\
**Created:** [August 5, 2010, 10:32pm UTC](https://www.ruby-forum.com/t/audio-files-length/192804 "2010-08-05T22:32:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcubed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@jcubed](https://www.ruby-forum.com/u/jcubed)\
**Post date:** [August 5, 2010, 10:32pm UTC](https://www.ruby-forum.com/t/audio-files-length/192804/1 "2010-08-05T22:32:12Z")

</div>

I’m modifying a Radio Automation program that I built with tkSnack for  
Ruby (which does not work on my computer), to work with Rubygame…

One main problem is that I can not find a method to determine how long  
an audio file is in Rubygame… a necessary component in my program.

Is there a method in Rubygame, or is there a gem that can do this?  
(working with multiple audio file types specifically wav and mp3)

---

<div class="post-metadata">

**Author:** ![jcubed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@jcubed](https://www.ruby-forum.com/u/jcubed)\
**Post date:** [August 6, 2010, 8:58am UTC](https://www.ruby-forum.com/t/audio-files-length/192804/2 "2010-08-06T08:58:39Z")

</div>

Hi,

To get the frame length of the MP3 file Please use the below ruby gem

Ruby-MP3info → [http://ruby-mp3info.rubyforge.org/](http://ruby-mp3info.rubyforge.org/)

NOTE:

Class → Mp3Info  
Method Name → frame\_length

Let me update the status

Thanks  
Raveendran  
[http://raveendran.wordpress.ocm](http://raveendran.wordpress.ocm)
