Class: AudioInfo::Ogg
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
198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/audioinfo.rb', line 198 def parse aInfo={"title"=>"title","artist"=>"artist","album"=>"album", "date"=>"year", "tracknumber"=>"tracknumber"} f=File.open(@sFile, "r") vf = ::Ogg::VorbisFile.new vf.open(f) comments=vf.comments(-1) @channels=vf.channels(-1) @sample_rate=vf.sample_rate(-1) @time=vf.time_total(-1) @bps=vf.bitrate(-1) arreglarValoresEstandar(aInfo) {|tag| comments[tag]} vf.close end |