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