svcore
1.9
|
#include <AudioFileReader.h>
Public Types | |
typedef std::map< QString, QString > | TagMap |
Signals | |
void | frameCountChanged () |
Public Member Functions | |
virtual | ~AudioFileReader () |
bool | isOK () const |
virtual QString | getError () const |
int | getFrameCount () const |
int | getChannelCount () const |
int | getSampleRate () const |
virtual int | getNativeRate () const |
virtual QString | getLocation () const |
Return the location of the audio data in the reader (as passed in to the FileSource constructor, for example). | |
virtual QString | getTitle () const |
Return the title of the work in the audio file, if known. | |
virtual QString | getMaker () const |
Return the "maker" of the work in the audio file, if known. | |
virtual TagMap | getTags () const |
virtual bool | isQuicklySeekable () const =0 |
Return true if this file supports fast seek and random access. | |
virtual void | getInterleavedFrames (int start, int count, SampleBlock &frames) const =0 |
Return interleaved samples for count frames from index start. | |
virtual void | getDeInterleavedFrames (int start, int count, std::vector< SampleBlock > &frames) const |
Return de-interleaved samples for count frames from index start. | |
virtual int | getDecodeCompletion () const |
virtual bool | isUpdating () const |
Protected Attributes | |
int | m_frameCount |
int | m_channelCount |
int | m_sampleRate |
Definition at line 28 of file AudioFileReader.h.
typedef std::map<QString, QString> AudioFileReader::TagMap |
Definition at line 65 of file AudioFileReader.h.
virtual AudioFileReader::~AudioFileReader | ( | ) | [inline, virtual] |
Definition at line 33 of file AudioFileReader.h.
bool AudioFileReader::isOK | ( | ) | const [inline] |
Definition at line 35 of file AudioFileReader.h.
References m_channelCount.
Referenced by AudioFileReaderFactory::create(), DecodingWavFileReader::DecodingWavFileReader(), WaveFileModel::getData(), CodedAudioFileReader::getInterleavedFrames(), CodedAudioFileReader::initialiseDecodeCache(), and WaveFileModel::isOK().
virtual QString AudioFileReader::getError | ( | ) | const [inline, virtual] |
Reimplemented in OggVorbisFileReader, MP3FileReader, DecodingWavFileReader, and WavFileReader.
Definition at line 37 of file AudioFileReader.h.
Referenced by AudioFileReaderFactory::create().
int AudioFileReader::getFrameCount | ( | ) | const [inline] |
Definition at line 39 of file AudioFileReader.h.
References m_frameCount.
Referenced by DecodingWavFileReader::addBlock(), DecodingWavFileReader::DecodingWavFileReader(), WaveFileModel::getFrameCount(), and DecodingWavFileReader::DecodeThread::run().
int AudioFileReader::getChannelCount | ( | ) | const [inline] |
Definition at line 40 of file AudioFileReader.h.
References m_channelCount.
Referenced by WritableWaveFileModel::addSamples(), DecodingWavFileReader::DecodingWavFileReader(), WaveFileModel::getChannelCount(), and getDeInterleavedFrames().
int AudioFileReader::getSampleRate | ( | ) | const [inline] |
Definition at line 41 of file AudioFileReader.h.
References m_sampleRate.
Referenced by AudioFileReaderFactory::create(), DecodingWavFileReader::DecodingWavFileReader(), WaveFileModel::getSampleRate(), and WaveFileModel::WaveFileModel().
virtual int AudioFileReader::getNativeRate | ( | ) | const [inline, virtual] |
Reimplemented in CodedAudioFileReader.
Definition at line 43 of file AudioFileReader.h.
References m_sampleRate.
Referenced by WaveFileModel::getNativeRate().
virtual QString AudioFileReader::getLocation | ( | ) | const [inline, virtual] |
Return the location of the audio data in the reader (as passed in to the FileSource constructor, for example).
Reimplemented in OggVorbisFileReader, MP3FileReader, DecodingWavFileReader, and WavFileReader.
Definition at line 49 of file AudioFileReader.h.
Referenced by WaveFileModel::getLocation().
virtual QString AudioFileReader::getTitle | ( | ) | const [inline, virtual] |
Return the title of the work in the audio file, if known.
This may be implemented by subclasses that support file tagging. This is not the same thing as the file name.
Reimplemented in OggVorbisFileReader, and MP3FileReader.
Definition at line 56 of file AudioFileReader.h.
Referenced by WaveFileModel::getTitle(), and WaveFileModel::WaveFileModel().
virtual QString AudioFileReader::getMaker | ( | ) | const [inline, virtual] |
Return the "maker" of the work in the audio file, if known.
This could represent almost anything (band, composer, conductor, artist etc).
Reimplemented in OggVorbisFileReader, and MP3FileReader.
Definition at line 63 of file AudioFileReader.h.
Referenced by WaveFileModel::getMaker().
virtual TagMap AudioFileReader::getTags | ( | ) | const [inline, virtual] |
Reimplemented in OggVorbisFileReader, and MP3FileReader.
Definition at line 66 of file AudioFileReader.h.
virtual bool AudioFileReader::isQuicklySeekable | ( | ) | const [pure virtual] |
Return true if this file supports fast seek and random access.
Typically this will be true for uncompressed formats and false for compressed ones.
Implemented in CodedAudioFileReader, and WavFileReader.
Referenced by AudioFileReaderFactory::create().
virtual void AudioFileReader::getInterleavedFrames | ( | int | start, |
int | count, | ||
SampleBlock & | frames | ||
) | const [pure virtual] |
Return interleaved samples for count frames from index start.
The resulting sample block will contain count * getChannelCount() samples (or fewer if end of file is reached).
The subclass implementations of this function must be thread-safe -- that is, safe to call from multiple threads with different arguments on the same object at the same time.
Implemented in WavFileReader, and CodedAudioFileReader.
Referenced by WaveFileModel::getData(), getDeInterleavedFrames(), WaveFileModel::getSummaries(), and WaveFileModel::RangeCacheFillThread::run().
void AudioFileReader::getDeInterleavedFrames | ( | int | start, |
int | count, | ||
std::vector< SampleBlock > & | frames | ||
) | const [virtual] |
Return de-interleaved samples for count frames from index start.
Implemented in this class (it calls getInterleavedFrames and de-interleaves). The resulting vector will contain getChannelCount() sample blocks of count samples each (or fewer if end of file is reached).
Definition at line 19 of file AudioFileReader.cpp.
References getChannelCount(), and getInterleavedFrames().
virtual int AudioFileReader::getDecodeCompletion | ( | ) | const [inline, virtual] |
Reimplemented in OggVorbisFileReader, MP3FileReader, WavFileReader, and DecodingWavFileReader.
Definition at line 99 of file AudioFileReader.h.
Referenced by WaveFileModel::isReady().
virtual bool AudioFileReader::isUpdating | ( | ) | const [inline, virtual] |
Reimplemented in OggVorbisFileReader, MP3FileReader, WavFileReader, and DecodingWavFileReader.
Definition at line 101 of file AudioFileReader.h.
Referenced by WaveFileModel::RangeCacheFillThread::run().
void AudioFileReader::frameCountChanged | ( | ) | [signal] |
Referenced by WavFileReader::updateFrameCount().
int AudioFileReader::m_frameCount [protected] |
Definition at line 107 of file AudioFileReader.h.
Referenced by MP3FileReader::accept(), CodedAudioFileReader::CodedAudioFileReader(), getFrameCount(), CodedAudioFileReader::pushBufferNonResampling(), CodedAudioFileReader::pushBufferResampling(), WavFileReader::updateFrameCount(), and WavFileReader::WavFileReader().
int AudioFileReader::m_channelCount [protected] |
Definition at line 108 of file AudioFileReader.h.
Referenced by MP3FileReader::accept(), OggVorbisFileReader::acceptFrames(), CodedAudioFileReader::addSamplesToDecodeCache(), DecodingWavFileReader::DecodingWavFileReader(), CodedAudioFileReader::finishDecodeCache(), getChannelCount(), CodedAudioFileReader::getInterleavedFrames(), WavFileReader::getInterleavedFrames(), CodedAudioFileReader::initialiseDecodeCache(), isOK(), MP3FileReader::MP3FileReader(), OggVorbisFileReader::OggVorbisFileReader(), CodedAudioFileReader::pushBufferNonResampling(), CodedAudioFileReader::pushBufferResampling(), MP3FileReader::DecodeThread::run(), WavFileReader::updateFrameCount(), and WavFileReader::WavFileReader().
int AudioFileReader::m_sampleRate [protected] |
Definition at line 109 of file AudioFileReader.h.
Referenced by MP3FileReader::accept(), DecodingWavFileReader::addBlock(), CodedAudioFileReader::CodedAudioFileReader(), getNativeRate(), getSampleRate(), CodedAudioFileReader::initialiseDecodeCache(), MP3FileReader::MP3FileReader(), OggVorbisFileReader::OggVorbisFileReader(), CodedAudioFileReader::pushBuffer(), WavFileReader::updateFrameCount(), and WavFileReader::WavFileReader().