Removing AudioDriver.
This commit is contained in:
parent
ae5b87ea2a
commit
20ad328e4a
|
@ -1,22 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/apu/audio_driver.h>
|
||||
|
||||
|
||||
using namespace xe;
|
||||
using namespace xe::apu;
|
||||
|
||||
|
||||
AudioDriver::AudioDriver(Memory* memory) :
|
||||
memory_(memory) {
|
||||
}
|
||||
|
||||
AudioDriver::~AudioDriver() {
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_APU_AUDIO_DRIVER_H_
|
||||
#define XENIA_APU_AUDIO_DRIVER_H_
|
||||
|
||||
#include <xenia/core.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace apu {
|
||||
|
||||
|
||||
class AudioDriver {
|
||||
public:
|
||||
virtual ~AudioDriver();
|
||||
|
||||
Memory* memory() const { return memory_; }
|
||||
|
||||
virtual void Initialize() = 0;
|
||||
|
||||
protected:
|
||||
AudioDriver(Memory* memory);
|
||||
|
||||
Memory* memory_;
|
||||
};
|
||||
|
||||
|
||||
} // namespace apu
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_APU_AUDIO_DRIVER_H_
|
|
@ -12,7 +12,6 @@
|
|||
#include <xenia/emulator.h>
|
||||
#include <xenia/cpu/processor.h>
|
||||
#include <xenia/cpu/xenon_thread_state.h>
|
||||
#include <xenia/apu/audio_driver.h>
|
||||
|
||||
|
||||
using namespace xe;
|
||||
|
@ -22,7 +21,7 @@ using namespace xe::cpu;
|
|||
|
||||
AudioSystem::AudioSystem(Emulator* emulator) :
|
||||
emulator_(emulator), memory_(emulator->memory()),
|
||||
thread_(0), running_(false), driver_(0),
|
||||
thread_(0), running_(false),
|
||||
client_({ 0 }), can_submit_(false) {
|
||||
// Create the run loop used for any windows/etc.
|
||||
// This must be done on the thread we create the driver.
|
||||
|
@ -72,7 +71,6 @@ void AudioSystem::ThreadStart() {
|
|||
|
||||
// Initialize driver and ringbuffer.
|
||||
Initialize();
|
||||
XEASSERTNOTNULL(driver_);
|
||||
|
||||
auto processor = emulator_->processor();
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ XEDECLARECLASS2(xe, cpu, XenonThreadState);
|
|||
namespace xe {
|
||||
namespace apu {
|
||||
|
||||
class AudioDriver;
|
||||
|
||||
|
||||
class AudioSystem {
|
||||
public:
|
||||
|
@ -85,8 +83,6 @@ protected:
|
|||
uint32_t wrapped_callback_arg;
|
||||
} client_;
|
||||
bool can_submit_;
|
||||
|
||||
AudioDriver* driver_;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/apu/nop/nop_audio_driver.h>
|
||||
|
||||
#include <xenia/apu/apu-private.h>
|
||||
|
||||
|
||||
using namespace xe;
|
||||
using namespace xe::apu;
|
||||
using namespace xe::apu::nop;
|
||||
|
||||
|
||||
NopAudioDriver::NopAudioDriver(Memory* memory) :
|
||||
AudioDriver(memory) {
|
||||
}
|
||||
|
||||
NopAudioDriver::~NopAudioDriver() {
|
||||
}
|
||||
|
||||
void NopAudioDriver::Initialize() {
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_APU_NOP_NOP_AUDIO_DRIVER_H_
|
||||
#define XENIA_APU_NOP_NOP_AUDIO_DRIVER_H_
|
||||
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/apu/audio_driver.h>
|
||||
#include <xenia/apu/nop/nop_apu-private.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace apu {
|
||||
namespace nop {
|
||||
|
||||
|
||||
class NopAudioDriver : public AudioDriver {
|
||||
public:
|
||||
NopAudioDriver(Memory* memory);
|
||||
virtual ~NopAudioDriver();
|
||||
|
||||
virtual void Initialize();
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
} // namespace nop
|
||||
} // namespace apu
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_APU_NOP_NOP_AUDIO_DRIVER_H_
|
|
@ -10,7 +10,6 @@
|
|||
#include <xenia/apu/nop/nop_audio_system.h>
|
||||
|
||||
#include <xenia/apu/apu-private.h>
|
||||
#include <xenia/apu/nop/nop_audio_driver.h>
|
||||
|
||||
|
||||
using namespace xe;
|
||||
|
@ -27,9 +26,6 @@ NopAudioSystem::~NopAudioSystem() {
|
|||
|
||||
void NopAudioSystem::Initialize() {
|
||||
AudioSystem::Initialize();
|
||||
|
||||
XEASSERTNULL(driver_);
|
||||
driver_ = new NopAudioDriver(memory_);
|
||||
}
|
||||
|
||||
void NopAudioSystem::Pump() {
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
'nop_apu-private.h',
|
||||
'nop_apu.cc',
|
||||
'nop_apu.h',
|
||||
'nop_audio_driver.cc',
|
||||
'nop_audio_driver.h',
|
||||
'nop_audio_system.cc',
|
||||
'nop_audio_system.h',
|
||||
],
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
'apu-private.h',
|
||||
'apu.cc',
|
||||
'apu.h',
|
||||
'audio_driver.cc',
|
||||
'audio_driver.h',
|
||||
'audio_system.cc',
|
||||
'audio_system.h',
|
||||
],
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
'xaudio2_apu-private.h',
|
||||
'xaudio2_apu.cc',
|
||||
'xaudio2_apu.h',
|
||||
'xaudio2_audio_driver.cc',
|
||||
'xaudio2_audio_driver.h',
|
||||
'xaudio2_audio_system.cc',
|
||||
'xaudio2_audio_system.h',
|
||||
],
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/apu/xaudio2/xaudio2_audio_driver.h>
|
||||
|
||||
#include <xenia/apu/apu-private.h>
|
||||
|
||||
|
||||
using namespace xe;
|
||||
using namespace xe::apu;
|
||||
using namespace xe::apu::xaudio2;
|
||||
|
||||
|
||||
XAudio2AudioDriver::XAudio2AudioDriver(Memory* memory) :
|
||||
AudioDriver(memory) {
|
||||
}
|
||||
|
||||
XAudio2AudioDriver::~XAudio2AudioDriver() {
|
||||
}
|
||||
|
||||
void XAudio2AudioDriver::Initialize() {
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_APU_XAUDIO2_XAUDIO2_AUDIO_DRIVER_H_
|
||||
#define XENIA_APU_XAUDIO2_XAUDIO2_AUDIO_DRIVER_H_
|
||||
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/apu/audio_driver.h>
|
||||
#include <xenia/apu/xaudio2/xaudio2_apu-private.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace apu {
|
||||
namespace xaudio2 {
|
||||
|
||||
|
||||
class XAudio2AudioDriver : public AudioDriver {
|
||||
public:
|
||||
XAudio2AudioDriver(Memory* memory);
|
||||
virtual ~XAudio2AudioDriver();
|
||||
|
||||
virtual void Initialize();
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
} // namespace xaudio2
|
||||
} // namespace apu
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_APU_XAUDIO2_XAUDIO2_AUDIO_DRIVER_H_
|
|
@ -10,7 +10,6 @@
|
|||
#include <xenia/apu/xaudio2/xaudio2_audio_system.h>
|
||||
|
||||
#include <xenia/apu/apu-private.h>
|
||||
#include <xenia/apu/xaudio2/xaudio2_audio_driver.h>
|
||||
|
||||
#include <xenia/emulator.h>
|
||||
|
||||
|
@ -70,9 +69,6 @@ void XAudio2AudioSystem::Initialize() {
|
|||
}
|
||||
|
||||
pcm_voice_->Start();
|
||||
|
||||
XEASSERTNULL(driver_);
|
||||
driver_ = new XAudio2AudioDriver(memory_);
|
||||
}
|
||||
|
||||
void XAudio2AudioSystem::Pump() {
|
||||
|
|
Loading…
Reference in New Issue