Miam-Player  0.8.0
A nice music player
TagLib::MPEG::Properties Class Reference

An implementation of audio property reading for MP3. More...

#include <mpegproperties.h>

Inheritance diagram for TagLib::MPEG::Properties:
TagLib::AudioProperties

Public Member Functions

 Properties (File *file, ReadStyle style=Average)
 Create an instance of MPEG::Properties with the data read from the MPEG::File file. More...
 
virtual ~Properties ()
 Destroys this MPEG Properties instance. More...
 
virtual int length () const
 Returns the length of the file in seconds. More...
 
int lengthInSeconds () const
 Returns the length of the file in seconds. More...
 
int lengthInMilliseconds () const
 Returns the length of the file in milliseconds. More...
 
virtual int bitrate () const
 Returns the average bit rate of the file in kb/s. More...
 
virtual int sampleRate () const
 Returns the sample rate in Hz. More...
 
virtual int channels () const
 Returns the number of audio channels. More...
 
const XingHeaderxingHeader () const
 Returns a pointer to the Xing/VBRI header if one exists or null if no Xing/VBRI header was found. More...
 
Header::Version version () const
 Returns the MPEG Version of the file. More...
 
int layer () const
 Returns the layer version. More...
 
bool protectionEnabled () const
 Returns true if the MPEG protection bit is enabled. More...
 
Header::ChannelMode channelMode () const
 Returns the channel mode for this frame. More...
 
bool isCopyrighted () const
 Returns true if the copyrighted bit is set. More...
 
bool isOriginal () const
 Returns true if the "original" bit is set. More...
 
- Public Member Functions inherited from TagLib::AudioProperties
virtual ~AudioProperties ()
 Destroys this AudioProperties instance. More...
 
int lengthInSeconds () const
 Returns the length of the file in seconds. More...
 
int lengthInMilliseconds () const
 Returns the length of the file in milliseconds. More...
 

Additional Inherited Members

- Public Types inherited from TagLib::AudioProperties
enum  ReadStyle { Fast, Average, Accurate }
 Reading audio properties from a file can sometimes be very time consuming and for the most accurate results can often involve reading the entire file. More...
 
- Protected Member Functions inherited from TagLib::AudioProperties
 AudioProperties (ReadStyle style)
 Construct an audio properties instance. More...
 

Detailed Description

An implementation of audio property reading for MP3.

This reads the data from an MPEG Layer III stream found in the AudioProperties API.

Constructor & Destructor Documentation

◆ Properties()

TagLib::MPEG::Properties::Properties ( File file,
ReadStyle  style = Average 
)

Create an instance of MPEG::Properties with the data read from the MPEG::File file.

◆ ~Properties()

virtual TagLib::MPEG::Properties::~Properties ( )
virtual

Destroys this MPEG Properties instance.

Member Function Documentation

◆ bitrate()

virtual int TagLib::MPEG::Properties::bitrate ( ) const
virtual

Returns the average bit rate of the file in kb/s.

Implements TagLib::AudioProperties.

◆ channelMode()

Header::ChannelMode TagLib::MPEG::Properties::channelMode ( ) const

Returns the channel mode for this frame.

◆ channels()

virtual int TagLib::MPEG::Properties::channels ( ) const
virtual

Returns the number of audio channels.

Implements TagLib::AudioProperties.

◆ isCopyrighted()

bool TagLib::MPEG::Properties::isCopyrighted ( ) const

Returns true if the copyrighted bit is set.

◆ isOriginal()

bool TagLib::MPEG::Properties::isOriginal ( ) const

Returns true if the "original" bit is set.

◆ layer()

int TagLib::MPEG::Properties::layer ( ) const

Returns the layer version.

This will be between the values 1-3.

◆ length()

virtual int TagLib::MPEG::Properties::length ( ) const
virtual

Returns the length of the file in seconds.

The length is rounded down to the nearest whole second.

Note
This method is just an alias of lengthInSeconds().
Deprecated:

Implements TagLib::AudioProperties.

◆ lengthInMilliseconds()

int TagLib::MPEG::Properties::lengthInMilliseconds ( ) const

Returns the length of the file in milliseconds.

See also
lengthInSeconds()

◆ lengthInSeconds()

int TagLib::MPEG::Properties::lengthInSeconds ( ) const

Returns the length of the file in seconds.

The length is rounded down to the nearest whole second.

See also
lengthInMilliseconds()

◆ protectionEnabled()

bool TagLib::MPEG::Properties::protectionEnabled ( ) const

Returns true if the MPEG protection bit is enabled.

◆ sampleRate()

virtual int TagLib::MPEG::Properties::sampleRate ( ) const
virtual

Returns the sample rate in Hz.

Implements TagLib::AudioProperties.

◆ version()

Header::Version TagLib::MPEG::Properties::version ( ) const

Returns the MPEG Version of the file.

◆ xingHeader()

const XingHeader* TagLib::MPEG::Properties::xingHeader ( ) const

Returns a pointer to the Xing/VBRI header if one exists or null if no Xing/VBRI header was found.


The documentation for this class was generated from the following file: