Mercurial > hg > svcore
diff data/fileio/WavFileReader.h @ 829:f63051833723 tonioni
Merge
author | Chris Cannam <chris.cannam@eecs.qmul.ac.uk> |
---|---|
date | Wed, 17 Jul 2013 16:01:28 +0100 |
parents | f0558e69a074 |
children | 59e7fe1b1003 |
line wrap: on
line diff
--- a/data/fileio/WavFileReader.h Wed Jul 17 15:59:17 2013 +0100 +++ b/data/fileio/WavFileReader.h Wed Jul 17 16:01:28 2013 +0100 @@ -23,6 +23,16 @@ #include <set> +/** + * Reader for audio files using libsndfile. + * + * This is typically intended for seekable file types that can be read + * directly (e.g. WAV, AIFF etc). + * + * Compressed files supported by libsndfile (e.g. Ogg, FLAC) should + * normally be read using DecodingWavFileReader instead (which decodes + * to an intermediate cached file). + */ class WavFileReader : public AudioFileReader { public: @@ -32,6 +42,8 @@ virtual QString getLocation() const { return m_source.getLocation(); } virtual QString getError() const { return m_error; } + virtual bool isQuicklySeekable() const { return m_seekable; } + /** * Must be safe to call from multiple threads with different * arguments on the same object at the same time. @@ -59,6 +71,8 @@ QString m_path; QString m_error; + bool m_seekable; + mutable QMutex m_mutex; mutable float *m_buffer; mutable size_t m_bufsiz;