Class: AudioInfo::Audiofile
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
180 181 182 183 184 185 186 187 |
# File 'lib/audioinfo.rb', line 180 def parse ::AudioFile.open(@sFile) do |file| @sample_rate=file.rate @channels=file.channels @bits_per_sample=file.bits @time=file.frame_count/file.rate.to_f end end |