Removing use of runloop from audio system.

This commit is contained in:
Ben Vanik 2014-01-14 19:52:32 -08:00
parent 9a09c2072e
commit e7d61f4b1f
2 changed files with 0 additions and 19 deletions

View File

@ -23,10 +23,6 @@ AudioSystem::AudioSystem(Emulator* emulator) :
emulator_(emulator), memory_(emulator->memory()), emulator_(emulator), memory_(emulator->memory()),
thread_(0), running_(false), thread_(0), running_(false),
client_({ 0 }) { client_({ 0 }) {
// Create the run loop used for any windows/etc.
// This must be done on the thread we create the driver.
run_loop_ = xe_run_loop_create();
lock_ = xe_mutex_alloc(); lock_ = xe_mutex_alloc();
} }
@ -67,8 +63,6 @@ X_STATUS AudioSystem::Setup() {
} }
void AudioSystem::ThreadStart() { void AudioSystem::ThreadStart() {
xe_run_loop_ref run_loop = xe_run_loop_retain(run_loop_);
// Initialize driver and ringbuffer. // Initialize driver and ringbuffer.
Initialize(); Initialize();
@ -76,14 +70,6 @@ void AudioSystem::ThreadStart() {
// Main run loop. // Main run loop.
while (running_) { while (running_) {
// Peek main run loop.
if (xe_run_loop_pump(run_loop)) {
break;
}
if (!running_) {
break;
}
// Pump worker. // Pump worker.
// This may block. // This may block.
Pump(); Pump();
@ -108,8 +94,6 @@ void AudioSystem::ThreadStart() {
} }
running_ = false; running_ = false;
xe_run_loop_release(run_loop);
// TODO(benvanik): call module API to kill? // TODO(benvanik): call module API to kill?
} }
@ -123,8 +107,6 @@ void AudioSystem::Shutdown() {
delete thread_state_; delete thread_state_;
memory()->HeapFree(thread_block_, 0); memory()->HeapFree(thread_block_, 0);
xe_run_loop_release(run_loop_);
} }
void AudioSystem::RegisterClient( void AudioSystem::RegisterClient(

View File

@ -70,7 +70,6 @@ protected:
Memory* memory_; Memory* memory_;
cpu::Processor* processor_; cpu::Processor* processor_;
xe_run_loop_ref run_loop_;
xe_thread_ref thread_; xe_thread_ref thread_;
cpu::XenonThreadState* thread_state_; cpu::XenonThreadState* thread_state_;
uint32_t thread_block_; uint32_t thread_block_;