Implements the SoundfileData interface using libmad. More...
#include <soundfile.hpp>
Public Member Functions | |
| MP3Data (const QString &fname) | |
| QString | error () const |
| Used to get details in case of an error. | |
| real_vec | read_channel (int channel) |
| Loads a specified channel into a real-valued vector. | |
| size_t | frames () const |
| Returns the number of audio frames in each channel. | |
| double | length () const |
| Returns the length of the audio track in seconds. | |
| int | samplerate () const |
| Returns the samplerate of the audio file in Hz. | |
| int | channels () const |
| Returns the number of channels. | |
| bool | valid () const |
| Checks if the audio file is loaded correctly and ready for use. | |
Implements the SoundfileData interface using libmad.
This provides support for MP3 files.
Definition at line 56 of file soundfile.hpp.
| MP3Data::MP3Data | ( | const QString & | fname | ) |
Definition at line 160 of file soundfile.cpp.
| int MP3Data::channels | ( | ) | const [virtual] |
Returns the number of channels.
Implements SoundfileData.
Definition at line 287 of file soundfile.cpp.
| QString MP3Data::error | ( | ) | const [virtual] |
Used to get details in case of an error.
Implements SoundfileData.
Definition at line 221 of file soundfile.cpp.
| size_t MP3Data::frames | ( | ) | const [virtual] |
Returns the number of audio frames in each channel.
Implements SoundfileData.
Definition at line 272 of file soundfile.cpp.
| double MP3Data::length | ( | ) | const [virtual] |
Returns the length of the audio track in seconds.
Implements SoundfileData.
Definition at line 277 of file soundfile.cpp.
| real_vec MP3Data::read_channel | ( | int | channel | ) | [virtual] |
Loads a specified channel into a real-valued vector.
Implements SoundfileData.
Definition at line 226 of file soundfile.cpp.
| int MP3Data::samplerate | ( | ) | const [virtual] |
Returns the samplerate of the audio file in Hz.
Implements SoundfileData.
Definition at line 282 of file soundfile.cpp.
| bool MP3Data::valid | ( | ) | const [virtual] |
Checks if the audio file is loaded correctly and ready for use.
Implements SoundfileData.
Definition at line 292 of file soundfile.cpp.
1.7.1