Moved the XMA decoder out of AudioSystem and into its own world (plus minor code cleanup in the process).

This commit is contained in:
gibbed
2015-06-21 02:25:24 -05:00
parent 736dba5aca
commit 021b5a3d17
13 changed files with 858 additions and 732 deletions

View File

@@ -49,10 +49,12 @@ Emulator::~Emulator() {
// Give the systems time to shutdown before we delete them.
graphics_system_->Shutdown();
audio_system_->Shutdown();
xma_decoder_->Shutdown();
input_system_.reset();
graphics_system_.reset();
audio_system_.reset();
xma_decoder_.reset();
kernel_state_.reset();
file_system_.reset();
@@ -117,6 +119,8 @@ X_STATUS Emulator::Setup() {
return X_STATUS_NOT_IMPLEMENTED;
}
xma_decoder_ = std::move(std::make_unique<XmaDecoder>(this));
// Initialize the GPU.
graphics_system_ = std::move(xe::gpu::Create(this));
if (!graphics_system_) {
@@ -155,6 +159,11 @@ X_STATUS Emulator::Setup() {
return result;
}
result = xma_decoder_->Setup();
if (result) {
return result;
}
// HLE kernel modules.
kernel_state_->LoadKernelModule<kernel::XboxkrnlModule>();
kernel_state_->LoadKernelModule<kernel::XamModule>();