all repos — mgba @ 9c92a29b28d1f81224ba28d5fc83a9481eccd5eb

mGBA Game Boy Advance Emulator

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
23public slots:
24	virtual void start() = 0;
25	virtual void pause() = 0;
26
27	virtual void setBufferSamples(int samples) = 0;
28	virtual void inputParametersChanged() = 0;
29
30protected:
31	GBAThread* input() { return m_context; }
32private:
33	GBAThread* m_context;
34};
35
36}
37
38#endif