| TagLib 1.13 |  |

Public Member Functions | List of all members
TagLib::MPC::Properties Class Reference

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

`#include <mpcproperties.h>`

Inheritance diagram for TagLib::MPC::Properties:
[legend]
Collaboration diagram for TagLib::MPC::Properties:
[legend]

## Public Member Functions
| Properties (const ByteVector &data, long streamLength, ReadStyle style=Average)
| Properties (File *file, long streamLength, ReadStyle style=Average)
virtual | ~Properties ()
virtual TAGLIB_DEPRECATED int | length () const
int | lengthInSeconds () const
int | lengthInMilliseconds () const
virtual int | bitrate () const
virtual int | sampleRate () const
virtual int | channels () const
int | mpcVersion () const
unsigned int | totalFrames () const
unsigned int | sampleFrames () const
int | trackGain () const
int | trackPeak () const
int | albumGain () const
int | albumPeak () const
Public Member Functions inherited from TagLib::AudioProperties
virtual | ~AudioProperties ()
virtual int | length () const =0
int | lengthInSeconds () const
int | lengthInMilliseconds () const
virtual int | bitrate () const =0
virtual int | sampleRate () const =0
virtual int | channels () const =0

## Additional Inherited Members
Public Types inherited from TagLib::AudioProperties
enum | ReadStyle { Fast , Average , Accurate }
Protected Member Functions inherited from TagLib::AudioProperties
| AudioProperties (ReadStyle style)

## Detailed Description

An implementation of audio property reading for MPC.

This reads the data from an MPC stream found in the AudioProperties API.

## Constructor & Destructor Documentation

## ◆ Properties() [1/2]

TagLib::MPC::Properties::Properties | ( | const ByteVector & | data,
|  | long | streamLength,
|  | ReadStyle | style = `Average`
| ) |  |

Create an instance of MPC::Properties with the data read from the ByteVector data.

This constructor is deprecated. It only works for MPC version up to 7.

## ◆ Properties() [2/2]

TagLib::MPC::Properties::Properties | ( | File * | file,
|  | long | streamLength,
|  | ReadStyle | style = `Average`
| ) |  |

Create an instance of MPC::Properties with the data read directly from a MPC::File.

## ◆ ~Properties()

virtual TagLib::MPC::Properties::~Properties | ( |  | ) |
| virtual

Destroys this MPC::Properties instance.

## Member Function Documentation

## ◆ albumGain()

int TagLib::MPC::Properties::albumGain | ( |  | ) | const

Returns the album gain as an integer value, to convert to dB: albumGain in dB = 64.82 - (albumGain / 256)

## ◆ albumPeak()

int TagLib::MPC::Properties::albumPeak | ( |  | ) | const

Returns the album peak as an integer value, to convert to dB: albumPeak in dB = albumPeak / 256 to convert to floating [-1..1]: albumPeak = 10^(albumPeak / 256 / 20)/32768

## ◆ bitrate()

virtual int TagLib::MPC::Properties::bitrate | ( |  | ) | const
| virtual

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

Implements TagLib::AudioProperties.

## ◆ channels()

virtual int TagLib::MPC::Properties::channels | ( |  | ) | const
| virtual

Returns the number of audio channels.

Implements TagLib::AudioProperties.

## ◆ length()

virtual TAGLIB_DEPRECATED int TagLib::MPC::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:
  Use lengthInSeconds().

Implements TagLib::AudioProperties.

## ◆ lengthInMilliseconds()

int TagLib::MPC::Properties::lengthInMilliseconds | ( |  | ) | const

Returns the length of the file in milliseconds.

See also
  lengthInSeconds()

## ◆ lengthInSeconds()

int TagLib::MPC::Properties::lengthInSeconds | ( |  | ) | const

Returns the length of the file in seconds. The length is rounded down to the nearest whole second.

See also
  lengthInMilliseconds()

## ◆ mpcVersion()

int TagLib::MPC::Properties::mpcVersion | ( |  | ) | const

Returns the version of the bitstream (SV4-SV8)

## ◆ sampleFrames()

unsigned int TagLib::MPC::Properties::sampleFrames | ( |  | ) | const

## ◆ sampleRate()

virtual int TagLib::MPC::Properties::sampleRate | ( |  | ) | const
| virtual

Returns the sample rate in Hz.

Implements TagLib::AudioProperties.

## ◆ totalFrames()

unsigned int TagLib::MPC::Properties::totalFrames | ( |  | ) | const

## ◆ trackGain()

int TagLib::MPC::Properties::trackGain | ( |  | ) | const

Returns the track gain as an integer value, to convert to dB: trackGain in dB = 64.82 - (trackGain / 256)

## ◆ trackPeak()

int TagLib::MPC::Properties::trackPeak | ( |  | ) | const

Returns the track peak as an integer value, to convert to dB: trackPeak in dB = trackPeak / 256 to convert to floating [-1..1]: trackPeak = 10^(trackPeak / 256 / 20)/32768

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

- mpcproperties.h