svcore  1.9
AudioFileReaderFactory Class Reference

#include <AudioFileReaderFactory.h>

List of all members.

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 AudioFileReadercreateReader (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 AudioFileReadercreateThreadingReader (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 AudioFileReadercreate (FileSource source, int targetRate, bool normalised, bool threading, ProgressReporter *reporter)

Detailed Description

Definition at line 26 of file AudioFileReaderFactory.h.


Member Function Documentation

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().


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