#include <AudioFileReaderFactory.h>
Definition at line 25 of file 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, size_t targetRate=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, size_t targetRate=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, size_t targetRate, bool threading) |
| 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 29 of file AudioFileReaderFactory.cpp.
References OggVorbisFileReader::getSupportedExtensions(), MP3FileReader::getSupportedExtensions(), and WavFileReader::getSupportedExtensions().
Referenced by FileFinder::getOpenFileName().
| AudioFileReader * AudioFileReaderFactory::createReader | ( | FileSource | source, | |
| size_t | targetRate = 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.
Caller owns the returned object and must delete it after use.
Definition at line 57 of file AudioFileReaderFactory.cpp.
References create().
| AudioFileReader * AudioFileReaderFactory::createThreadingReader | ( | FileSource | source, | |
| size_t | targetRate = 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.
Caller owns the returned object and must delete it after use.
Definition at line 63 of file AudioFileReaderFactory.cpp.
References create().
Referenced by WaveFileModel::WaveFileModel().
| AudioFileReader * AudioFileReaderFactory::create | ( | FileSource | source, | |
| size_t | targetRate, | |||
| bool | threading | |||
| ) | [static, protected] |
Definition at line 69 of file AudioFileReaderFactory.cpp.
References CodedAudioFileReader::CacheInTemporaryFile, MP3FileReader::DecodeAtOnce, OggVorbisFileReader::DecodeAtOnce, MP3FileReader::DecodeThreaded, OggVorbisFileReader::DecodeThreaded, AudioFileReader::getLocation(), FileSource::getLocation(), AudioFileReader::getSampleRate(), FileSource::isAvailable(), AudioFileReader::isOK(), FileSource::isOK(), ResamplingWavFileReader::ResampleAtOnce, ResamplingWavFileReader::ResampleThreaded, MP3FileReader::supports(), OggVorbisFileReader::supports(), and WavFileReader::supports().
Referenced by createReader(), and createThreadingReader().
1.5.1