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@258
|
33 virtual QString getError() const override { return m_error; }
|
Chris@258
|
34 virtual bool isQuicklySeekable() const override { return m_quicklySeekable; }
|
Chris@106
|
35
|
Chris@258
|
36 virtual std::vector<float> getInterleavedFrames
|
Chris@258
|
37 (sv_frame_t start, sv_frame_t count) const override;
|
Chris@106
|
38
|
Chris@258
|
39 virtual int getDecodeCompletion() const override;
|
Chris@106
|
40
|
Chris@258
|
41 virtual bool isUpdating() const override;
|
Chris@106
|
42
|
Chris@106
|
43 protected:
|
Chris@107
|
44 QString m_error;
|
Chris@107
|
45 bool m_quicklySeekable;
|
Chris@107
|
46 QList<AudioFileReader *> m_readers;
|
Chris@106
|
47 };
|
Chris@106
|
48
|
Chris@106
|
49 #endif
|