src/platform/qt/AudioProcessor.h (view raw)
1/* Copyright (c) 2013-2014 Jeffrey Pfau
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6#ifndef QGBA_AUDIO_PROCESSOR
7#define QGBA_AUDIO_PROCESSOR
8#include <QObject>
9
10struct GBAThread;
11
12namespace QGBA {
13
14class AudioProcessor : public QObject {
15Q_OBJECT
16
17public:
18 static AudioProcessor* create();
19 AudioProcessor(QObject* parent = nullptr);
20
21 virtual void setInput(GBAThread* input);
22 int getBufferSamples() const { return m_samples; }
23
24public slots:
25 virtual void start() = 0;
26 virtual void pause() = 0;
27
28 virtual void setBufferSamples(int samples) = 0;
29 virtual void inputParametersChanged() = 0;
30
31protected:
32 GBAThread* input() { return m_context; }
33
34private:
35 GBAThread* m_context;
36 int m_samples;
37};
38
39}
40
41#endif