citra-emu
/
citra
Archived
1
0
Fork 0

tests/audio_core: remove hack for system objects

This commit is contained in:
Weiyi Wang 2019-02-14 14:08:45 -05:00
parent 64f6e5e597
commit 4d10a2d652
1 changed files with 4 additions and 8 deletions

View File

@ -20,17 +20,13 @@
#include "audio_fixures.h"
TEST_CASE("DSP HLE Audio Decoder", "[audio_core]") {
// HACK: see comments of member timing
Core::System::GetInstance().timing = std::make_unique<Core::Timing>();
Core::System::GetInstance().memory = std::make_unique<Memory::MemorySystem>();
Kernel::KernelSystem kernel(*Core::System::GetInstance().memory, 0);
Memory::MemorySystem memory;
SECTION("decoder should produce correct samples") {
auto process = kernel.CreateProcess(kernel.CreateCodeSet("", 0));
auto decoder =
#ifdef HAVE_MF
std::make_unique<AudioCore::HLE::WMFDecoder>(*Core::System::GetInstance().memory);
std::make_unique<AudioCore::HLE::WMFDecoder>(memory);
#elif HAVE_FFMPEG
std::make_unique<AudioCore::HLE::FFMPEGDecoder>(*Core::System::GetInstance().memory);
std::make_unique<AudioCore::HLE::FFMPEGDecoder>(memory);
#endif
AudioCore::HLE::BinaryRequest request;
@ -40,7 +36,7 @@ TEST_CASE("DSP HLE Audio Decoder", "[audio_core]") {
std::optional<AudioCore::HLE::BinaryResponse> response = decoder->ProcessRequest(request);
request.cmd = AudioCore::HLE::DecoderCommand::Decode;
u8* fcram = Core::System::GetInstance().memory->GetFCRAMPointer(0);
u8* fcram = memory.GetFCRAMPointer(0);
memcpy(fcram, fixure_buffer, fixure_buffer_size);
request.src_addr = Memory::FCRAM_PADDR;