all repos — mgba @ 7149dd3102a6bbb7f73cae7da0c01dc784b0f601

mGBA Game Boy Advance Emulator

src/platform/qt/AudioProcessor.cpp (view raw)

 1/* Copyright (c) 2013-2015 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#include "AudioProcessor.h"
 7
 8#ifdef BUILD_SDL
 9#include "AudioProcessorSDL.h"
10#else
11#include "AudioProcessorQt.h"
12#endif
13
14extern "C" {
15#include "gba/supervisor/thread.h"
16}
17
18using namespace QGBA;
19
20AudioProcessor* AudioProcessor::create() {
21#ifdef BUILD_SDL
22	return new AudioProcessorSDL();
23#else
24	return new AudioProcessorQt();
25#endif	
26}
27
28AudioProcessor::AudioProcessor(QObject* parent)
29	: QObject(parent)
30{
31}
32
33void AudioProcessor::setInput(GBAThread* input) {
34	m_context = input;
35}
36
37void AudioProcessor::setBufferSamples(int samples) {
38	m_samples = samples;
39}