Class: MpcInfo
- Inherits:
-
Object
- Object
- MpcInfo
- 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)' ].freeze
- FREQUENCIES =
[44_100, 48_000, 37_800, 32_000].freeze
- 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
-
#id3v2_tag ⇒ Object
readonly
Returns the value of attribute id3v2_tag.
-
#infos ⇒ Object
readonly
Returns the value of attribute infos.
Instance Method Summary collapse
-
#initialize(filename) ⇒ MpcInfo
constructor
A new instance of MpcInfo.
Constructor Details
#initialize(filename) ⇒ MpcInfo
Returns a new instance of MpcInfo.
39 40 41 42 43 44 45 |
# File 'lib/audioinfo/mpcinfo.rb', line 39 def initialize(filename) @file = File.open(filename, 'rb') @infos = {} @infos['raw'] = {} parse_infos end |
Instance Attribute Details
#id3v2_tag ⇒ Object (readonly)
Returns the value of attribute id3v2_tag.
37 38 39 |
# File 'lib/audioinfo/mpcinfo.rb', line 37 def id3v2_tag @id3v2_tag end |
#infos ⇒ Object (readonly)
Returns the value of attribute infos.
37 38 39 |
# File 'lib/audioinfo/mpcinfo.rb', line 37 def infos @infos end |