From 20ad328e4aed05486d45848e9684881667476de1 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Mon, 13 Jan 2014 00:05:08 -0800 Subject: [PATCH] Removing AudioDriver. --- src/xenia/apu/audio_driver.cc | 22 ---------- src/xenia/apu/audio_driver.h | 39 ------------------ src/xenia/apu/audio_system.cc | 4 +- src/xenia/apu/audio_system.h | 4 -- src/xenia/apu/nop/nop_audio_driver.cc | 28 ------------- src/xenia/apu/nop/nop_audio_driver.h | 40 ------------------- src/xenia/apu/nop/nop_audio_system.cc | 4 -- src/xenia/apu/nop/sources.gypi | 2 - src/xenia/apu/sources.gypi | 2 - src/xenia/apu/xaudio2/sources.gypi | 2 - src/xenia/apu/xaudio2/xaudio2_audio_driver.cc | 28 ------------- src/xenia/apu/xaudio2/xaudio2_audio_driver.h | 40 ------------------- src/xenia/apu/xaudio2/xaudio2_audio_system.cc | 4 -- 13 files changed, 1 insertion(+), 218 deletions(-) delete mode 100644 src/xenia/apu/audio_driver.cc delete mode 100644 src/xenia/apu/audio_driver.h delete mode 100644 src/xenia/apu/nop/nop_audio_driver.cc delete mode 100644 src/xenia/apu/nop/nop_audio_driver.h delete mode 100644 src/xenia/apu/xaudio2/xaudio2_audio_driver.cc delete mode 100644 src/xenia/apu/xaudio2/xaudio2_audio_driver.h diff --git a/src/xenia/apu/audio_driver.cc b/src/xenia/apu/audio_driver.cc deleted file mode 100644 index 6f95c775e..000000000 --- a/src/xenia/apu/audio_driver.cc +++ /dev/null @@ -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 - - -using namespace xe; -using namespace xe::apu; - - -AudioDriver::AudioDriver(Memory* memory) : - memory_(memory) { -} - -AudioDriver::~AudioDriver() { -} diff --git a/src/xenia/apu/audio_driver.h b/src/xenia/apu/audio_driver.h deleted file mode 100644 index 7e2269720..000000000 --- a/src/xenia/apu/audio_driver.h +++ /dev/null @@ -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 - - -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_ diff --git a/src/xenia/apu/audio_system.cc b/src/xenia/apu/audio_system.cc index c1b21421c..3611f0c0c 100644 --- a/src/xenia/apu/audio_system.cc +++ b/src/xenia/apu/audio_system.cc @@ -12,7 +12,6 @@ #include #include #include -#include 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(); diff --git a/src/xenia/apu/audio_system.h b/src/xenia/apu/audio_system.h index 5e81dbb65..ce5a4326f 100644 --- a/src/xenia/apu/audio_system.h +++ b/src/xenia/apu/audio_system.h @@ -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_; }; diff --git a/src/xenia/apu/nop/nop_audio_driver.cc b/src/xenia/apu/nop/nop_audio_driver.cc deleted file mode 100644 index 6d332a6b7..000000000 --- a/src/xenia/apu/nop/nop_audio_driver.cc +++ /dev/null @@ -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 - -#include - - -using namespace xe; -using namespace xe::apu; -using namespace xe::apu::nop; - - -NopAudioDriver::NopAudioDriver(Memory* memory) : - AudioDriver(memory) { -} - -NopAudioDriver::~NopAudioDriver() { -} - -void NopAudioDriver::Initialize() { -} diff --git a/src/xenia/apu/nop/nop_audio_driver.h b/src/xenia/apu/nop/nop_audio_driver.h deleted file mode 100644 index 4e50d99e5..000000000 --- a/src/xenia/apu/nop/nop_audio_driver.h +++ /dev/null @@ -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 - -#include -#include - - -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_ diff --git a/src/xenia/apu/nop/nop_audio_system.cc b/src/xenia/apu/nop/nop_audio_system.cc index f4d0caaa6..c4f38851a 100644 --- a/src/xenia/apu/nop/nop_audio_system.cc +++ b/src/xenia/apu/nop/nop_audio_system.cc @@ -10,7 +10,6 @@ #include #include -#include using namespace xe; @@ -27,9 +26,6 @@ NopAudioSystem::~NopAudioSystem() { void NopAudioSystem::Initialize() { AudioSystem::Initialize(); - - XEASSERTNULL(driver_); - driver_ = new NopAudioDriver(memory_); } void NopAudioSystem::Pump() { diff --git a/src/xenia/apu/nop/sources.gypi b/src/xenia/apu/nop/sources.gypi index 902e9530d..6675eff1e 100644 --- a/src/xenia/apu/nop/sources.gypi +++ b/src/xenia/apu/nop/sources.gypi @@ -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', ], diff --git a/src/xenia/apu/sources.gypi b/src/xenia/apu/sources.gypi index 92ea3258f..d82003e84 100644 --- a/src/xenia/apu/sources.gypi +++ b/src/xenia/apu/sources.gypi @@ -4,8 +4,6 @@ 'apu-private.h', 'apu.cc', 'apu.h', - 'audio_driver.cc', - 'audio_driver.h', 'audio_system.cc', 'audio_system.h', ], diff --git a/src/xenia/apu/xaudio2/sources.gypi b/src/xenia/apu/xaudio2/sources.gypi index 181c4f1c0..800f699bd 100644 --- a/src/xenia/apu/xaudio2/sources.gypi +++ b/src/xenia/apu/xaudio2/sources.gypi @@ -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', ], diff --git a/src/xenia/apu/xaudio2/xaudio2_audio_driver.cc b/src/xenia/apu/xaudio2/xaudio2_audio_driver.cc deleted file mode 100644 index 4b4ac3b83..000000000 --- a/src/xenia/apu/xaudio2/xaudio2_audio_driver.cc +++ /dev/null @@ -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 - -#include - - -using namespace xe; -using namespace xe::apu; -using namespace xe::apu::xaudio2; - - -XAudio2AudioDriver::XAudio2AudioDriver(Memory* memory) : - AudioDriver(memory) { -} - -XAudio2AudioDriver::~XAudio2AudioDriver() { -} - -void XAudio2AudioDriver::Initialize() { -} diff --git a/src/xenia/apu/xaudio2/xaudio2_audio_driver.h b/src/xenia/apu/xaudio2/xaudio2_audio_driver.h deleted file mode 100644 index 05f1b3371..000000000 --- a/src/xenia/apu/xaudio2/xaudio2_audio_driver.h +++ /dev/null @@ -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 - -#include -#include - - -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_ diff --git a/src/xenia/apu/xaudio2/xaudio2_audio_system.cc b/src/xenia/apu/xaudio2/xaudio2_audio_system.cc index c74f1cb7a..85f498b78 100644 --- a/src/xenia/apu/xaudio2/xaudio2_audio_system.cc +++ b/src/xenia/apu/xaudio2/xaudio2_audio_system.cc @@ -10,7 +10,6 @@ #include #include -#include #include @@ -70,9 +69,6 @@ void XAudio2AudioSystem::Initialize() { } pcm_voice_->Start(); - - XEASSERTNULL(driver_); - driver_ = new XAudio2AudioDriver(memory_); } void XAudio2AudioSystem::Pump() {