From 963aedd8ccc207d5b65b97bd46b930771f2bda6e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 10 Dec 2016 07:51:50 -0500 Subject: Add all services to the Service namespace Previously there was a split where some of the services were in the Service namespace and others were not. --- src/core/hle/service/csnd_snd.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/core/hle/service/csnd_snd.cpp') diff --git a/src/core/hle/service/csnd_snd.cpp b/src/core/hle/service/csnd_snd.cpp index 20c759ad7..6544e89a2 100644 --- a/src/core/hle/service/csnd_snd.cpp +++ b/src/core/hle/service/csnd_snd.cpp @@ -9,10 +9,8 @@ #include "core/hle/kernel/shared_memory.h" #include "core/hle/service/csnd_snd.h" -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Namespace CSND_SND - -namespace CSND_SND { +namespace Service { +namespace CSND { const Interface::FunctionInfo FunctionTable[] = { {0x00010140, Initialize, "Initialize"}, @@ -29,17 +27,14 @@ const Interface::FunctionInfo FunctionTable[] = { {0x000C0000, nullptr, "Reset"}, }; -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Interface class - -Interface::Interface() { +CSND_SND::CSND_SND() { Register(FunctionTable); } static Kernel::SharedPtr shared_memory = nullptr; static Kernel::SharedPtr mutex = nullptr; -void Initialize(Service::Interface* self) { +void Initialize(Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); u32 size = Common::AlignUp(cmd_buff[1], Memory::PAGE_SIZE); @@ -56,7 +51,7 @@ void Initialize(Service::Interface* self) { cmd_buff[4] = Kernel::g_handle_table.Create(shared_memory).MoveFrom(); } -void ExecuteType0Commands(Service::Interface* self) { +void ExecuteType0Commands(Interface* self) { u32* const cmd_buff = Kernel::GetCommandBuffer(); u8* const ptr = shared_memory->GetPointer(cmd_buff[1]); @@ -74,15 +69,16 @@ void ExecuteType0Commands(Service::Interface* self) { } } -void AcquireSoundChannels(Service::Interface* self) { +void AcquireSoundChannels(Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); cmd_buff[1] = 0; cmd_buff[2] = 0xFFFFFF00; } -void Shutdown(Service::Interface* self) { +void Shutdown(Interface* self) { shared_memory = nullptr; mutex = nullptr; } -} // namespace +} // namespace CSND +} // namespace Service -- cgit v1.2.3