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
22 virtual unsigned sampleRate() const override;
23
24public slots:
25 virtual void setInput(std::shared_ptr<CoreController> input) override;
26 virtual void stop() 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{2048, 44100};
37};
38
39}
40
41#endif
42
43#endif