![]() |
|
#include <audioproperties.h>
Public Types | |
enum | ReadStyle { Fast, Average, Accurate } |
Public Member Functions | |
virtual | ~AudioProperties () |
virtual int | length () const =0 |
virtual int | bitrate () const =0 |
virtual int | sampleRate () const =0 |
virtual int | channels () const =0 |
Protected Member Functions | |
AudioProperties (ReadStyle style) |
The values here are common to most audio formats. For more specific, codec dependant values, please see see the subclasses APIs. This is meant to compliment the TagLib::File and TagLib::Tag APIs in providing a simple interface that is sufficient for most applications.
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. Because in many situations speed is critical or the accuracy of the values is not particularly important this allows the level of desired accuracy to be set.
virtual TagLib::AudioProperties::~AudioProperties | ( | ) | [virtual] |
Destroys this AudioProperties instance.
TagLib::AudioProperties::AudioProperties | ( | ReadStyle | style | ) | [protected] |
virtual int TagLib::AudioProperties::bitrate | ( | ) | const [pure virtual] |
Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. For variable bitrate formats this is either the average or nominal bitrate.
Implemented in TagLib::ASF::Properties, TagLib::FLAC::Properties, TagLib::MP4::Properties, TagLib::MPC::Properties, TagLib::MPEG::Properties, TagLib::Ogg::Speex::Properties, TagLib::Ogg::Vorbis::Properties, TagLib::RIFF::AIFF::Properties, TagLib::RIFF::WAV::Properties, TagLib::TrueAudio::Properties, and TagLib::WavPack::Properties.
virtual int TagLib::AudioProperties::channels | ( | ) | const [pure virtual] |
Returns the number of audio channels.
Implemented in TagLib::ASF::Properties, TagLib::FLAC::Properties, TagLib::MP4::Properties, TagLib::MPC::Properties, TagLib::MPEG::Properties, TagLib::Ogg::Speex::Properties, TagLib::Ogg::Vorbis::Properties, TagLib::RIFF::AIFF::Properties, TagLib::RIFF::WAV::Properties, TagLib::TrueAudio::Properties, and TagLib::WavPack::Properties.
virtual int TagLib::AudioProperties::length | ( | ) | const [pure virtual] |
Returns the length of the file in seconds.
Implemented in TagLib::ASF::Properties, TagLib::FLAC::Properties, TagLib::MP4::Properties, TagLib::MPC::Properties, TagLib::MPEG::Properties, TagLib::Ogg::Speex::Properties, TagLib::Ogg::Vorbis::Properties, TagLib::RIFF::AIFF::Properties, TagLib::RIFF::WAV::Properties, TagLib::TrueAudio::Properties, and TagLib::WavPack::Properties.
virtual int TagLib::AudioProperties::sampleRate | ( | ) | const [pure virtual] |
Returns the sample rate in Hz.
Implemented in TagLib::ASF::Properties, TagLib::FLAC::Properties, TagLib::MP4::Properties, TagLib::MPC::Properties, TagLib::MPEG::Properties, TagLib::Ogg::Speex::Properties, TagLib::Ogg::Vorbis::Properties, TagLib::RIFF::AIFF::Properties, TagLib::RIFF::WAV::Properties, TagLib::TrueAudio::Properties, and TagLib::WavPack::Properties.