#include <strawberry_mpegheader.h>
Public Members | |||
enum | SB_MPEG_VERSION { MPEG_VERSION_UNDEF, MPEG_VERSION_1, MPEG_VERSION_2, MPEG_VERSION_25 } | ||
List of MPEG versions (1.0, 2.0, and 2.5). | |||
enum | SB_MPEG_LAYER { MPEG_LAYER_UNDEF, MPEG_LAYER_1, MPEG_LAYER_2, MPEG_LAYER_3 } | ||
List of MP3 layers (1, 2, or 3). | |||
enum | SB_MPEG_CHANNELMODE { MPEG_MODE_UNDEF, MPEG_MODE_STEREO, MPEG_MODE_JOINTSTEREO, MPEG_MODE_DUALCHANNEL, MPEG_MODE_SINGLECHANNEL } | ||
List of channel modes (stereo, joint stereo, dual-channel mono, or single-channel mono). | |||
enum | SB_MPEG_CHANNELEXTENSION { MPEG_EXTENSION_UNDEF, MPEG_EXTENSION_12_4_31, MPEG_EXTENSION_12_8_31, MPEG_EXTENSION_12_12_31, MPEG_EXTENSION_12_16_31, MPEG_EXTENSION_3_NI_NM, MPEG_EXTENSION_3_YI_NM, MPEG_EXTENSION_3_NI_YM, MPEG_EXTENSION_3_YI_YM } | ||
List of channel mode extensions (bands 4-31, bands 8-31, bands 12-31, bands 16-31, none, intensity stereo, MS stereo, intensity and MS stereo). | |||
enum | SB_MPEG_EMPHASIS { MPEG_EMPH_UNDEF, MPEG_EMPH_NONE, MPEG_EMPH_5015MS, MPEG_EMPH_CCITT_J17 } | ||
List of emphasis types (none, 50/15 microsec, CCITT j.17). | |||
SB_MPEGHeader () | |||
Constructor, allocates stuff. | |||
~SB_MPEGHeader () | |||
Destructor, deallocates stuff. More... | |||
bool | Open (CFile *openfile) | ||
"Open" MP3 from an already opened CFile. | |||
bool | Open (const CString &filename) | ||
Open MP3 with specified filename. | |||
bool | ExtractHeader () | ||
Actually load header once the file has been opened. | |||
bool | Close () | ||
Close MP3 file. | |||
void | EraseAllFields () | ||
Clears all header information in memory. More... | |||
CString | GenerateReport () | ||
Return a multiline string with a bunch of MPEG header info. | |||
bool | IsFrameSynced () | ||
Returns whether or not the current frame is valid. More... | |||
SB_MPEG_VERSION | GetVersion () | ||
Returns identifier of MPEG version. More... | |||
CString | GetVersionString () | ||
Returns a string description of the MPEG header version. More... | |||
SB_MPEG_LAYER | GetLayer () | ||
Returns identifier of layer number. More... | |||
CString | GetLayerString () | ||
Returns a string description of the MPEG header layer. More... | |||
bool | IsCRCs () | ||
Returns whether or not the MPEG header includes CRC checksum data. More... | |||
int | GetBitrate () | ||
Returns the bitrate, in bits per second, of the MPEG header. More... | |||
CString | GetBitrateString () | ||
Returns a string description of the MPEG header bitrate. More... | |||
int | GetSamplingRate () | ||
Returns the sampling rate, in Hz, of the MPEG header. More... | |||
CString | GetSamplingRateString () | ||
Returns a string description of the MPEG header sampling rate. More... | |||
bool | IsPadded () | ||
Returns whether or not the MPEG header is padded. More... | |||
bool | IsPrivate () | ||
Returns whether or not the MPEG header has the private bit set. The private bit is set aside for a user-defined use. More... | |||
SB_MPEG_CHANNELMODE | GetChannelMode () | ||
Returns identifier of channel mode. More... | |||
CString | GetChannelModeString () | ||
Returns a string description of the MPEG header channel mode. More... | |||
SB_MPEG_CHANNELEXTENSION | GetChannelModeExtension () | ||
Returns identifier of layer channel mode extension. More... | |||
CString | GetChannelModeExtensionString () | ||
Returns a string description of the MPEG header channel mode extension. More... | |||
bool | IsCopyrighted () | ||
Returns whether or not the MPEG header has the copyrighted bit set. More... | |||
bool | IsOriginal () | ||
Returns whether or not the MPEG header has the original bit set. More... | |||
SB_MPEG_EMPHASIS | GetEmphasis () | ||
Returns identifier of layer emphasis. More... | |||
CString | GetEmphasisString () | ||
Returns a string description of the MPEG header emphasis mode. More... | |||
long | GetNumFrames () | ||
Returns the total number of frames in the current MP3. More... | |||
long | GetNumSeconds () | ||
Returns the total number of seconds in the current MP3. More... |
Includes MPEG header detection and extraction of useful audio attributes.
SB_MPEGHeader::~SB_MPEGHeader () |
void SB_MPEGHeader::EraseAllFields () |
Clears all header information in memory.
Only deallocates the open CFile pointer if it created it itself, not if it was passed on to it.
none |
bool SB_MPEGHeader::IsFrameSynced () [inline]
|
Returns whether or not the current frame is valid.
SB_MPEG_VERSION SB_MPEGHeader::GetVersion () [inline]
|
Returns identifier of MPEG version.
CString SB_MPEGHeader::GetVersionString () |
Returns a string description of the MPEG header version.
SB_MPEG_LAYER SB_MPEGHeader::GetLayer () [inline]
|
Returns identifier of layer number.
CString SB_MPEGHeader::GetLayerString () |
Returns a string description of the MPEG header layer.
bool SB_MPEGHeader::IsCRCs () [inline]
|
Returns whether or not the MPEG header includes CRC checksum data.
int SB_MPEGHeader::GetBitrate () [inline]
|
Returns the bitrate, in bits per second, of the MPEG header.
CString SB_MPEGHeader::GetBitrateString () |
Returns a string description of the MPEG header bitrate.
int SB_MPEGHeader::GetSamplingRate () [inline]
|
Returns the sampling rate, in Hz, of the MPEG header.
CString SB_MPEGHeader::GetSamplingRateString () |
Returns a string description of the MPEG header sampling rate.
bool SB_MPEGHeader::IsPadded () [inline]
|
Returns whether or not the MPEG header is padded.
bool SB_MPEGHeader::IsPrivate () [inline]
|
Returns whether or not the MPEG header has the private bit set. The private bit is set aside for a user-defined use.
SB_MPEG_CHANNELMODE SB_MPEGHeader::GetChannelMode () [inline]
|
Returns identifier of channel mode.
CString SB_MPEGHeader::GetChannelModeString () |
Returns a string description of the MPEG header channel mode.
SB_MPEG_CHANNELEXTENSION SB_MPEGHeader::GetChannelModeExtension () [inline]
|
Returns identifier of layer channel mode extension.
CString SB_MPEGHeader::GetChannelModeExtensionString () |
Returns a string description of the MPEG header channel mode extension.
bool SB_MPEGHeader::IsCopyrighted () [inline]
|
Returns whether or not the MPEG header has the copyrighted bit set.
bool SB_MPEGHeader::IsOriginal () [inline]
|
Returns whether or not the MPEG header has the original bit set.
SB_MPEG_EMPHASIS SB_MPEGHeader::GetEmphasis () [inline]
|
Returns identifier of layer emphasis.
CString SB_MPEGHeader::GetEmphasisString () |
Returns a string description of the MPEG header emphasis mode.
long SB_MPEGHeader::GetNumFrames () [inline]
|
Returns the total number of frames in the current MP3.
long SB_MPEGHeader::GetNumSeconds () [inline]
|
Returns the total number of seconds in the current MP3.