|
|
@ -2,6 +2,7 @@ |
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
// Refer to the license.txt file included.
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
|
|
|
#include <array>
|
|
|
#include <memory>
|
|
|
#include <memory>
|
|
|
#include <string>
|
|
|
#include <string>
|
|
|
#include "audio_core/audio_core.h"
|
|
|
#include "audio_core/audio_core.h"
|
|
|
@ -10,8 +11,8 @@ |
|
|
#include "audio_core/null_sink.h"
|
|
|
#include "audio_core/null_sink.h"
|
|
|
#include "audio_core/sink.h"
|
|
|
#include "audio_core/sink.h"
|
|
|
#include "audio_core/sink_details.h"
|
|
|
#include "audio_core/sink_details.h"
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
#include "core/core_timing.h"
|
|
|
#include "core/core_timing.h"
|
|
|
#include "core/hle/kernel/vm_manager.h"
|
|
|
|
|
|
#include "core/hle/service/dsp_dsp.h"
|
|
|
#include "core/hle/service/dsp_dsp.h"
|
|
|
|
|
|
|
|
|
namespace AudioCore { |
|
|
namespace AudioCore { |
|
|
@ -39,20 +40,8 @@ void Init() { |
|
|
CoreTiming::ScheduleEvent(audio_frame_ticks, tick_event); |
|
|
CoreTiming::ScheduleEvent(audio_frame_ticks, tick_event); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void AddAddressSpace(Kernel::VMManager& address_space) { |
|
|
|
|
|
auto r0_vma = address_space |
|
|
|
|
|
.MapBackingMemory(DSP::HLE::region0_base, |
|
|
|
|
|
reinterpret_cast<u8*>(&DSP::HLE::g_regions[0]), |
|
|
|
|
|
sizeof(DSP::HLE::SharedMemory), Kernel::MemoryState::IO) |
|
|
|
|
|
.MoveFrom(); |
|
|
|
|
|
address_space.Reprotect(r0_vma, Kernel::VMAPermission::ReadWrite); |
|
|
|
|
|
|
|
|
|
|
|
auto r1_vma = address_space |
|
|
|
|
|
.MapBackingMemory(DSP::HLE::region1_base, |
|
|
|
|
|
reinterpret_cast<u8*>(&DSP::HLE::g_regions[1]), |
|
|
|
|
|
sizeof(DSP::HLE::SharedMemory), Kernel::MemoryState::IO) |
|
|
|
|
|
.MoveFrom(); |
|
|
|
|
|
address_space.Reprotect(r1_vma, Kernel::VMAPermission::ReadWrite); |
|
|
|
|
|
|
|
|
std::array<u8, Memory::DSP_RAM_SIZE>& GetDspMemory() { |
|
|
|
|
|
return DSP::HLE::g_dsp_memory.raw_memory; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void SelectSink(std::string sink_id) { |
|
|
void SelectSink(std::string sink_id) { |
|
|
|