Class: AudioInfo::Flac

Inherits:
Tipo
  • Object
show all
Defined in:
lib/audioinfo.rb

Constant Summary

Constants inherited from Tipo

Tipo::TAGS

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

#parseObject



213
214
215
216
217
218
219
220
221
222
223
# File 'lib/audioinfo.rb', line 213

def parse
	aInfo={"title"=>"title","artist"=>"artist","album"=>"album", "date"=>"year", "tracknumber"=>"tracknumber"}
	oInfo=::Flac.info(@sFile)
	@time = oInfo.time
	@sample_rate = oInfo.sample_rate;
	@channels= oInfo.channels;
	@bits_per_sample=oInfo.bits_per_sample
	@bps=(@size * 8 / @time)
	arreglarValoresEstandar(aInfo) {|tag| 
	oInfo.comments[tag]}	
end