Removing AudioDriver.

This commit is contained in:
Ben Vanik 2014-01-13 00:05:08 -08:00
parent ae5b87ea2a
commit 20ad328e4a
13 changed files with 1 additions and 218 deletions

View File

@ -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() {
}

View File

@ -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_

View File

@ -12,7 +12,6 @@
#include <xenia/emulator.h> #include <xenia/emulator.h>
#include <xenia/cpu/processor.h> #include <xenia/cpu/processor.h>
#include <xenia/cpu/xenon_thread_state.h> #include <xenia/cpu/xenon_thread_state.h>
#include <xenia/apu/audio_driver.h>
using namespace xe; using namespace xe;
@ -22,7 +21,7 @@ using namespace xe::cpu;
AudioSystem::AudioSystem(Emulator* emulator) : AudioSystem::AudioSystem(Emulator* emulator) :
emulator_(emulator), memory_(emulator->memory()), emulator_(emulator), memory_(emulator->memory()),
thread_(0), running_(false), driver_(0), thread_(0), running_(false),
client_({ 0 }), can_submit_(false) { client_({ 0 }), can_submit_(false) {
// Create the run loop used for any windows/etc. // Create the run loop used for any windows/etc.
// This must be done on the thread we create the driver. // This must be done on the thread we create the driver.
@ -72,7 +71,6 @@ void AudioSystem::ThreadStart() {
// Initialize driver and ringbuffer. // Initialize driver and ringbuffer.
Initialize(); Initialize();
XEASSERTNOTNULL(driver_);
auto processor = emulator_->processor(); auto processor = emulator_->processor();

View File

@ -22,8 +22,6 @@ XEDECLARECLASS2(xe, cpu, XenonThreadState);
namespace xe { namespace xe {
namespace apu { namespace apu {
class AudioDriver;
class AudioSystem { class AudioSystem {
public: public:
@ -85,8 +83,6 @@ protected:
uint32_t wrapped_callback_arg; uint32_t wrapped_callback_arg;
} client_; } client_;
bool can_submit_; bool can_submit_;
AudioDriver* driver_;
}; };

View File

@ -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() {
}

View File

@ -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_

View File

@ -10,7 +10,6 @@
#include <xenia/apu/nop/nop_audio_system.h> #include <xenia/apu/nop/nop_audio_system.h>
#include <xenia/apu/apu-private.h> #include <xenia/apu/apu-private.h>
#include <xenia/apu/nop/nop_audio_driver.h>
using namespace xe; using namespace xe;
@ -27,9 +26,6 @@ NopAudioSystem::~NopAudioSystem() {
void NopAudioSystem::Initialize() { void NopAudioSystem::Initialize() {
AudioSystem::Initialize(); AudioSystem::Initialize();
XEASSERTNULL(driver_);
driver_ = new NopAudioDriver(memory_);
} }
void NopAudioSystem::Pump() { void NopAudioSystem::Pump() {

View File

@ -4,8 +4,6 @@
'nop_apu-private.h', 'nop_apu-private.h',
'nop_apu.cc', 'nop_apu.cc',
'nop_apu.h', 'nop_apu.h',
'nop_audio_driver.cc',
'nop_audio_driver.h',
'nop_audio_system.cc', 'nop_audio_system.cc',
'nop_audio_system.h', 'nop_audio_system.h',
], ],

View File

@ -4,8 +4,6 @@
'apu-private.h', 'apu-private.h',
'apu.cc', 'apu.cc',
'apu.h', 'apu.h',
'audio_driver.cc',
'audio_driver.h',
'audio_system.cc', 'audio_system.cc',
'audio_system.h', 'audio_system.h',
], ],

View File

@ -4,8 +4,6 @@
'xaudio2_apu-private.h', 'xaudio2_apu-private.h',
'xaudio2_apu.cc', 'xaudio2_apu.cc',
'xaudio2_apu.h', 'xaudio2_apu.h',
'xaudio2_audio_driver.cc',
'xaudio2_audio_driver.h',
'xaudio2_audio_system.cc', 'xaudio2_audio_system.cc',
'xaudio2_audio_system.h', 'xaudio2_audio_system.h',
], ],

View File

@ -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() {
}

View File

@ -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_

View File

@ -10,7 +10,6 @@
#include <xenia/apu/xaudio2/xaudio2_audio_system.h> #include <xenia/apu/xaudio2/xaudio2_audio_system.h>
#include <xenia/apu/apu-private.h> #include <xenia/apu/apu-private.h>
#include <xenia/apu/xaudio2/xaudio2_audio_driver.h>
#include <xenia/emulator.h> #include <xenia/emulator.h>
@ -70,9 +69,6 @@ void XAudio2AudioSystem::Initialize() {
} }
pcm_voice_->Start(); pcm_voice_->Start();
XEASSERTNULL(driver_);
driver_ = new XAudio2AudioDriver(memory_);
} }
void XAudio2AudioSystem::Pump() { void XAudio2AudioSystem::Pump() {