Class: AudioInfo::Mp3
Constant Summary
Constants inherited from Tipo
Instance Attribute Summary
Attributes inherited from Tipo
#album, #artist, #bits_per_sample, #bps, #channels, #sFile, #sample_rate, #size, #time, #title, #tracknumber, #year
Instance Method Summary collapse
Methods inherited from Tipo
#arreglarValor, #arreglarValoresEstandar, #incompleto?, #initialize, #kbps, #merge
Constructor Details
This class inherits a constructor from AudioInfo::Tipo
Instance Method Details
#parse ⇒ Object
281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/audioinfo.rb', line 281 def parse aInfo={'title'=>'title', 'artist'=>'artist', 'album'=>'album', 'tracknum'=>'tracknumber','year'=>'year'} ::Mp3Info.open(@sFile) do |mp3info| @sample_rate=mp3info.samplerate @channels=2 @bits_per_sample=16 @time=mp3info.length @bps=mp3info.bitrate * 1024 arreglarValoresEstandar(aInfo) {|tag| mp3info.tag[tag]} end end |