Mercurial > hg > sonic-annotator
annotate runner/MultiplexedReader.h @ 219:d0fe861bb116
Fix grisly error in multiplexed audio reader (calling itself!)
author | Chris Cannam |
---|---|
date | Fri, 20 Nov 2015 09:32:11 +0000 |
parents | 3f7c65f26559 |
children | 857ce6ecb163 |
rev | line source |
---|---|
Chris@106 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@106 | 2 |
Chris@106 | 3 /* |
Chris@106 | 4 Sonic Annotator |
Chris@106 | 5 A utility for batch feature extraction from audio files. |
Chris@106 | 6 Mark Levy, Chris Sutton and Chris Cannam, Queen Mary, University of London. |
Chris@106 | 7 Copyright 2007-2014 QMUL. |
Chris@106 | 8 |
Chris@106 | 9 This program is free software; you can redistribute it and/or |
Chris@106 | 10 modify it under the terms of the GNU General Public License as |
Chris@106 | 11 published by the Free Software Foundation; either version 2 of the |
Chris@106 | 12 License, or (at your option) any later version. See the file |
Chris@106 | 13 COPYING included with this distribution for more information. |
Chris@106 | 14 */ |
Chris@106 | 15 |
Chris@106 | 16 #ifndef _MULTIPLEXED_READER_H_ |
Chris@106 | 17 #define _MULTIPLEXED_READER_H_ |
Chris@106 | 18 |
Chris@106 | 19 #include "data/fileio/AudioFileReader.h" |
Chris@106 | 20 |
Chris@106 | 21 #include <QString> |
Chris@106 | 22 #include <QList> |
Chris@106 | 23 |
Chris@107 | 24 class MultiplexedReader : public AudioFileReader |
Chris@106 | 25 { |
Chris@106 | 26 Q_OBJECT |
Chris@106 | 27 |
Chris@106 | 28 public: |
Chris@107 | 29 // I take ownership of readers |
Chris@106 | 30 MultiplexedReader(QList<AudioFileReader *> readers); |
Chris@107 | 31 virtual ~MultiplexedReader(); |
Chris@106 | 32 |
Chris@107 | 33 virtual QString getError() const { return m_error; } |
Chris@107 | 34 virtual bool isQuicklySeekable() const { return m_quicklySeekable; } |
Chris@106 | 35 |
Chris@195 | 36 virtual SampleBlock getInterleavedFrames(sv_frame_t start, sv_frame_t count) const; |
Chris@106 | 37 |
Chris@107 | 38 virtual int getDecodeCompletion() const; |
Chris@106 | 39 |
Chris@107 | 40 virtual bool isUpdating() const; |
Chris@106 | 41 |
Chris@106 | 42 protected: |
Chris@107 | 43 QString m_error; |
Chris@107 | 44 bool m_quicklySeekable; |
Chris@107 | 45 QList<AudioFileReader *> m_readers; |
Chris@106 | 46 }; |
Chris@106 | 47 |
Chris@106 | 48 #endif |