Class: MpcInfo

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

Constant Summary collapse

PROFILES_NAMES =
[ 
  'no profile',
  'Experimental',
  'unused',
  'unused',
  'unused',
  'below Telephone (q = 0.0)',
  'below Telephone (q = 1.0)',
  'Telephone (q = 2.0)',
  'Thumb (q = 3.0)',
  'Radio (q = 4.0)',
  'Standard (q = 5.0)',
  'Extreme (q = 6.0)',
  'Insane (q = 7.0)',
  'BrainDead (q = 8.0)',
  'above BrainDead (q = 9.0)',
  'above BrainDead (q = 10.0)'
]
FREQUENCIES =
[ 44100, 48000, 37800, 32000 ]
SV4_6_HEADER =
Regexp.new('^[\x00\x01\x10\x11\x40\x41\x50\x51\x80\x81\x90\x91\xC0\xC1\xD0\xD1][\x20-37][\x00\x20\x40\x60\x80\xA0\xC0\xE0]/', nil, 'n')

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ MpcInfo

Returns a new instance of MpcInfo.



36
37
38
39
40
41
42
# File 'lib/audioinfo/mpcinfo.rb', line 36

def initialize(filename)
  @file = File.open(filename, "rb")

  @infos = {}
  @infos['raw'] = {}
  parse_infos
end

Instance Attribute Details

#id3v2_tagObject (readonly)

Returns the value of attribute id3v2_tag.



34
35
36
# File 'lib/audioinfo/mpcinfo.rb', line 34

def id3v2_tag
  @id3v2_tag
end

#infosObject (readonly)

Returns the value of attribute infos.



33
34
35
# File 'lib/audioinfo/mpcinfo.rb', line 33

def infos
  @infos
end