svcore
1.9
|
#include <AudioFileReaderFactory.h>
Static Public Member Functions | |
static QString | getKnownExtensions () |
Return the file extensions that we have audio file readers for, in a format suitable for use with QFileDialog. | |
static AudioFileReader * | createReader (FileSource source, int targetRate=0, bool normalised=false, ProgressReporter *reporter=0) |
Return an audio file reader initialised to the file at the given path, or NULL if no suitable reader for this path is available or the file cannot be opened. | |
static AudioFileReader * | createThreadingReader (FileSource source, int targetRate=0, bool normalised=false, ProgressReporter *reporter=0) |
Return an audio file reader initialised to the file at the given path, or NULL if no suitable reader for this path is available or the file cannot be opened. | |
Static Protected Member Functions | |
static AudioFileReader * | create (FileSource source, int targetRate, bool normalised, bool threading, ProgressReporter *reporter) |
Definition at line 26 of file AudioFileReaderFactory.h.
QString AudioFileReaderFactory::getKnownExtensions | ( | ) | [static] |
Return the file extensions that we have audio file readers for, in a format suitable for use with QFileDialog.
For example, "*.wav *.aiff *.ogg".
Definition at line 30 of file AudioFileReaderFactory.cpp.
References WavFileReader::getSupportedExtensions(), MP3FileReader::getSupportedExtensions(), and OggVorbisFileReader::getSupportedExtensions().
AudioFileReader * AudioFileReaderFactory::createReader | ( | FileSource | source, |
int | targetRate = 0 , |
||
bool | normalised = false , |
||
ProgressReporter * | reporter = 0 |
||
) | [static] |
Return an audio file reader initialised to the file at the given path, or NULL if no suitable reader for this path is available or the file cannot be opened.
If targetRate is non-zero, the file will be resampled to that rate (transparently). You can query reader->getNativeRate() if you want to find out whether the file is being resampled or not.
If normalised is true, the file data will be normalised to abs(max) == 1.0. Otherwise the file will not be normalised.
If a ProgressReporter is provided, it will be updated with progress status. Caller retains ownership of the reporter object.
Caller owns the returned object and must delete it after use.
Definition at line 61 of file AudioFileReaderFactory.cpp.
References create().
AudioFileReader * AudioFileReaderFactory::createThreadingReader | ( | FileSource | source, |
int | targetRate = 0 , |
||
bool | normalised = false , |
||
ProgressReporter * | reporter = 0 |
||
) | [static] |
Return an audio file reader initialised to the file at the given path, or NULL if no suitable reader for this path is available or the file cannot be opened.
If the reader supports threaded decoding, it will be used and the file decoded in a background thread.
If targetRate is non-zero, the file will be resampled to that rate (transparently). You can query reader->getNativeRate() if you want to find out whether the file is being resampled or not.
If normalised is true, the file data will be normalised to abs(max) == 1.0. Otherwise the file will not be normalised.
If a ProgressReporter is provided, it will be updated with progress status. This will only be meaningful if threading mode is not used because the file reader in use does not support it; otherwise progress as reported will jump straight to 100% before threading mode takes over. Caller retains ownership of the reporter object.
Caller owns the returned object and must delete it after use.
Definition at line 70 of file AudioFileReaderFactory.cpp.
References create().
Referenced by WaveFileModel::WaveFileModel().
AudioFileReader * AudioFileReaderFactory::create | ( | FileSource | source, |
int | targetRate, | ||
bool | normalised, | ||
bool | threading, | ||
ProgressReporter * | reporter | ||
) | [static, protected] |
Definition at line 79 of file AudioFileReaderFactory.cpp.
References CodedAudioFileReader::CacheInTemporaryFile, MP3FileReader::DecodeAtOnce, OggVorbisFileReader::DecodeAtOnce, MP3FileReader::DecodeThreaded, OggVorbisFileReader::DecodeThreaded, FileSource::getContentType(), AudioFileReader::getError(), FileSource::getErrorString(), FileSource::getLocation(), AudioFileReader::getSampleRate(), FileSource::isAvailable(), AudioFileReader::isOK(), FileSource::isOK(), AudioFileReader::isQuicklySeekable(), DecodingWavFileReader::ResampleAtOnce, DecodingWavFileReader::ResampleThreaded, WavFileReader::supports(), MP3FileReader::supports(), OggVorbisFileReader::supports(), and SVDEBUG.
Referenced by createReader(), and createThreadingReader().