class Mp3::Frame::Header
- Mp3::Frame::Header
- Reference
- Object
Defined in:
id3/mp3/header.crConstant Summary
-
BITMAP =
{sync: 21..31, version_bits: 19..20, layer_bits: 17..18, crc: 16, bitrate_idx: 12..15, sampling_idx: 10..11, padding_bit: 9, reserved: 8, channel_mode_bits: 6..7, mode_extension_bits: 4..5, copyright: 3, original: 2, emphasis: 0..1}
-
BITRATE_MAP =
{MPEGVersion::V1 => {Layer::L1 => [0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448].map(&.kbit), Layer::L2 => [0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384].map(&.kbit), Layer::L3 => [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320].map(&.kbit)}, MPEGVersion::V2 => COMMON_BITRATES, MPEGVersion::V2_5 => COMMON_BITRATES}
-
Bitrates are in kilo-bits / second
-
COMMON_BITRATES =
{Layer::L1 => [0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256].map(&.kbit), Layer::L2 => [0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160].map(&.kbit), Layer::L3 => [0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160].map(&.kbit)}
-
V2/2.5
-
SAMPLE_RATE =
{MPEGVersion::V1 => [44100, 48000, 32000], MPEGVersion::V2 => [22050, 24000, 16000], MPEGVersion::V2_5 => [11025, 12000, 8000]}
-
SAMPLES_PER_FRAME =
{MPEGVersion::V1 => {Layer::L1 => 384, Layer::L2 => 1152, Layer::L3 => 1152}, MPEGVersion::V2 => {Layer::L1 => 384, Layer::L2 => 1152, Layer::L3 => 576}, MPEGVersion::V2_5 => {Layer::L1 => 384, Layer::L2 => 1152, Layer::L3 => 576}}
Constructors
Instance Method Summary
- #bitrate : BinarySize
- #bitrate_idx
- #channel_mode
- #channel_mode_bits
- #copyright
- #crc
- #emphasis
- #frame_duration
- #frame_size : BinarySize
- #layer
- #layer_bits
- #mode_extension_bits
- #mono?
- #original
- #padding : BinarySize
- #padding_bit
- #raw : UInt32
- #reserved
- #sample_duration
- #samples_per_frame
- #sampling_idx
- #sampling_rate
- #slot_size(*args, **options)
- #slot_size(*args, **options, &)
- #sync
- #to_s(io)
- #valid?
- #version
- #version_bits
- #xing_header_offset : BinarySize