svcore  1.9
AudioFileReader Class Reference

#include <AudioFileReader.h>

Inheritance diagram for AudioFileReader:

List of all members.

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

Detailed Description

Definition at line 28 of file AudioFileReader.h.


Member Typedef Documentation

typedef std::map<QString, QString> AudioFileReader::TagMap

Definition at line 65 of file AudioFileReader.h.


Constructor & Destructor Documentation

virtual AudioFileReader::~AudioFileReader ( ) [inline, virtual]

Definition at line 33 of file AudioFileReader.h.


Member Function Documentation

virtual QString AudioFileReader::getError ( ) const [inline, virtual]
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]

Member Data Documentation


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