tests/audio_core: remove hack for system objects
This commit is contained in:
parent
64f6e5e597
commit
4d10a2d652
|
@ -20,17 +20,13 @@
|
||||||
#include "audio_fixures.h"
|
#include "audio_fixures.h"
|
||||||
|
|
||||||
TEST_CASE("DSP HLE Audio Decoder", "[audio_core]") {
|
TEST_CASE("DSP HLE Audio Decoder", "[audio_core]") {
|
||||||
// HACK: see comments of member timing
|
Memory::MemorySystem memory;
|
||||||
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);
|
|
||||||
SECTION("decoder should produce correct samples") {
|
SECTION("decoder should produce correct samples") {
|
||||||
auto process = kernel.CreateProcess(kernel.CreateCodeSet("", 0));
|
|
||||||
auto decoder =
|
auto decoder =
|
||||||
#ifdef HAVE_MF
|
#ifdef HAVE_MF
|
||||||
std::make_unique<AudioCore::HLE::WMFDecoder>(*Core::System::GetInstance().memory);
|
std::make_unique<AudioCore::HLE::WMFDecoder>(memory);
|
||||||
#elif HAVE_FFMPEG
|
#elif HAVE_FFMPEG
|
||||||
std::make_unique<AudioCore::HLE::FFMPEGDecoder>(*Core::System::GetInstance().memory);
|
std::make_unique<AudioCore::HLE::FFMPEGDecoder>(memory);
|
||||||
#endif
|
#endif
|
||||||
AudioCore::HLE::BinaryRequest request;
|
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);
|
std::optional<AudioCore::HLE::BinaryResponse> response = decoder->ProcessRequest(request);
|
||||||
|
|
||||||
request.cmd = AudioCore::HLE::DecoderCommand::Decode;
|
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);
|
memcpy(fcram, fixure_buffer, fixure_buffer_size);
|
||||||
request.src_addr = Memory::FCRAM_PADDR;
|
request.src_addr = Memory::FCRAM_PADDR;
|
||||||
|
|
Reference in New Issue