src/platform/qt/AudioProcessorSDL.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_SDL
7#define QGBA_AUDIO_PROCESSOR_SDL
8#include "AudioProcessor.h"
9
10#ifdef BUILD_SDL
11
12extern "C" {
13#include "platform/sdl/sdl-audio.h"
14}
15
16namespace QGBA {
17
18class AudioProcessorSDL : public AudioProcessor {
19Q_OBJECT
20
21public:
22 AudioProcessorSDL(QObject* parent = nullptr);
23 ~AudioProcessorSDL();
24
25 virtual unsigned sampleRate() const override;
26
27public slots:
28 virtual bool start() override;
29 virtual void pause() override;
30
31 virtual void setBufferSamples(int samples) override;
32 virtual void inputParametersChanged() override;
33
34 virtual void requestSampleRate(unsigned) override;
35
36private:
37 GBASDLAudio m_audio;
38};
39
40}
41
42#endif
43
44#endif