all repos — mgba @ d0771b78e22e89b5523badee256ec6e15467dc54

mGBA Game Boy Advance Emulator

src/platform/qt/AudioProcessorQt.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_QT
 7#define QGBA_AUDIO_PROCESSOR_QT
 8#include "AudioProcessor.h"
 9
10class QAudioOutput;
11
12namespace QGBA {
13
14class AudioDevice;
15
16class AudioProcessorQt : public AudioProcessor {
17Q_OBJECT
18
19public:
20	AudioProcessorQt(QObject* parent = nullptr);
21
22	virtual void setInput(mCoreThread* input) override;
23	virtual unsigned sampleRate() const override;
24
25public slots:
26	virtual bool start() override;
27	virtual void pause() override;
28
29	virtual void setBufferSamples(int samples) override;
30	virtual void inputParametersChanged() override;
31
32	virtual void requestSampleRate(unsigned) override;
33
34private:
35	QAudioOutput* m_audioOutput;
36	AudioDevice* m_device;
37	unsigned m_sampleRate;
38};
39
40}
41
42#endif