diff options
Diffstat (limited to 'src/core/hle/service/audio')
-rw-r--r-- | src/core/hle/service/audio/audctl.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/audio/audctl.h | 4 | ||||
-rw-r--r-- | src/core/hle/service/audio/audin_u.cpp | 32 | ||||
-rw-r--r-- | src/core/hle/service/audio/audin_u.h | 14 | ||||
-rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 30 | ||||
-rw-r--r-- | src/core/hle/service/audio/audout_u.h | 8 | ||||
-rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 56 | ||||
-rw-r--r-- | src/core/hle/service/audio/audren_u.h | 14 | ||||
-rw-r--r-- | src/core/hle/service/audio/hwopus.cpp | 22 | ||||
-rw-r--r-- | src/core/hle/service/audio/hwopus.h | 10 |
10 files changed, 92 insertions, 104 deletions
diff --git a/src/core/hle/service/audio/audctl.cpp b/src/core/hle/service/audio/audctl.cpp index 5abf22ba4..7ad93be6b 100644 --- a/src/core/hle/service/audio/audctl.cpp +++ b/src/core/hle/service/audio/audctl.cpp @@ -2,8 +2,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "common/logging/log.h" -#include "core/hle/ipc_helpers.h" #include "core/hle/service/audio/audctl.h" +#include "core/hle/service/ipc_helpers.h" namespace Service::Audio { @@ -72,7 +72,7 @@ AudCtl::AudCtl(Core::System& system_) : ServiceFramework{system_, "audctl"} { AudCtl::~AudCtl() = default; -void AudCtl::GetTargetVolumeMin(Kernel::HLERequestContext& ctx) { +void AudCtl::GetTargetVolumeMin(HLERequestContext& ctx) { LOG_DEBUG(Audio, "called."); // This service function is currently hardcoded on the @@ -84,7 +84,7 @@ void AudCtl::GetTargetVolumeMin(Kernel::HLERequestContext& ctx) { rb.Push(target_min_volume); } -void AudCtl::GetTargetVolumeMax(Kernel::HLERequestContext& ctx) { +void AudCtl::GetTargetVolumeMax(HLERequestContext& ctx) { LOG_DEBUG(Audio, "called."); // This service function is currently hardcoded on the diff --git a/src/core/hle/service/audio/audctl.h b/src/core/hle/service/audio/audctl.h index a27ff6cfe..8e31ac237 100644 --- a/src/core/hle/service/audio/audctl.h +++ b/src/core/hle/service/audio/audctl.h @@ -17,8 +17,8 @@ public: ~AudCtl() override; private: - void GetTargetVolumeMin(Kernel::HLERequestContext& ctx); - void GetTargetVolumeMax(Kernel::HLERequestContext& ctx); + void GetTargetVolumeMin(HLERequestContext& ctx); + void GetTargetVolumeMax(HLERequestContext& ctx); }; } // namespace Service::Audio diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index 26dec7147..f0640c64f 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp @@ -7,9 +7,9 @@ #include "common/logging/log.h" #include "common/string_util.h" #include "core/core.h" -#include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_event.h" #include "core/hle/service/audio/audin_u.h" +#include "core/hle/service/ipc_helpers.h" namespace Service::Audio { using namespace AudioCore::AudioIn; @@ -61,7 +61,7 @@ public: } private: - void GetAudioInState(Kernel::HLERequestContext& ctx) { + void GetAudioInState(HLERequestContext& ctx) { const auto state = static_cast<u32>(impl->GetState()); LOG_DEBUG(Service_Audio, "called. State={}", state); @@ -71,7 +71,7 @@ private: rb.Push(state); } - void Start(Kernel::HLERequestContext& ctx) { + void Start(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); auto result = impl->StartSystem(); @@ -80,7 +80,7 @@ private: rb.Push(result); } - void Stop(Kernel::HLERequestContext& ctx) { + void Stop(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); auto result = impl->StopSystem(); @@ -89,7 +89,7 @@ private: rb.Push(result); } - void AppendAudioInBuffer(Kernel::HLERequestContext& ctx) { + void AppendAudioInBuffer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; u64 tag = rp.PopRaw<u64>(); @@ -111,7 +111,7 @@ private: rb.Push(result); } - void RegisterBufferEvent(Kernel::HLERequestContext& ctx) { + void RegisterBufferEvent(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); auto& buffer_event = impl->GetBufferEvent(); @@ -121,7 +121,7 @@ private: rb.PushCopyObjects(buffer_event); } - void GetReleasedAudioInBuffer(Kernel::HLERequestContext& ctx) { + void GetReleasedAudioInBuffer(HLERequestContext& ctx) { const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>(); std::vector<u64> released_buffers(write_buffer_size); @@ -141,7 +141,7 @@ private: rb.Push(count); } - void ContainsAudioInBuffer(Kernel::HLERequestContext& ctx) { + void ContainsAudioInBuffer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 tag{rp.Pop<u64>()}; @@ -154,7 +154,7 @@ private: rb.Push(buffer_queued); } - void GetAudioInBufferCount(Kernel::HLERequestContext& ctx) { + void GetAudioInBufferCount(HLERequestContext& ctx) { const auto buffer_count = impl->GetBufferCount(); LOG_DEBUG(Service_Audio, "called. Buffer count={}", buffer_count); @@ -165,7 +165,7 @@ private: rb.Push(buffer_count); } - void SetDeviceGain(Kernel::HLERequestContext& ctx) { + void SetDeviceGain(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto volume{rp.Pop<f32>()}; @@ -177,7 +177,7 @@ private: rb.Push(ResultSuccess); } - void GetDeviceGain(Kernel::HLERequestContext& ctx) { + void GetDeviceGain(HLERequestContext& ctx) { auto volume{impl->GetVolume()}; LOG_DEBUG(Service_Audio, "called. Gain {}", volume); @@ -187,7 +187,7 @@ private: rb.Push(volume); } - void FlushAudioInBuffers(Kernel::HLERequestContext& ctx) { + void FlushAudioInBuffers(HLERequestContext& ctx) { bool flushed{impl->FlushAudioInBuffers()}; LOG_DEBUG(Service_Audio, "called. Were any buffers flushed? {}", flushed); @@ -221,7 +221,7 @@ AudInU::AudInU(Core::System& system_) AudInU::~AudInU() = default; -void AudInU::ListAudioIns(Kernel::HLERequestContext& ctx) { +void AudInU::ListAudioIns(HLERequestContext& ctx) { using namespace AudioCore::AudioRenderer; LOG_DEBUG(Service_Audio, "called"); @@ -241,7 +241,7 @@ void AudInU::ListAudioIns(Kernel::HLERequestContext& ctx) { rb.Push(out_count); } -void AudInU::ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx) { +void AudInU::ListAudioInsAutoFiltered(HLERequestContext& ctx) { using namespace AudioCore::AudioRenderer; LOG_DEBUG(Service_Audio, "called"); @@ -261,7 +261,7 @@ void AudInU::ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx) { rb.Push(out_count); } -void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) { +void AudInU::OpenAudioIn(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; auto in_params{rp.PopRaw<AudioInParameter>()}; auto applet_resource_user_id{rp.PopRaw<u64>()}; @@ -311,7 +311,7 @@ void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) { rb.PushIpcInterface<IAudioIn>(audio_in); } -void AudInU::OpenAudioInProtocolSpecified(Kernel::HLERequestContext& ctx) { +void AudInU::OpenAudioInProtocolSpecified(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; auto protocol_specified{rp.PopRaw<u64>()}; auto in_params{rp.PopRaw<AudioInParameter>()}; diff --git a/src/core/hle/service/audio/audin_u.h b/src/core/hle/service/audio/audin_u.h index b45fda78a..51e770ff9 100644 --- a/src/core/hle/service/audio/audin_u.h +++ b/src/core/hle/service/audio/audin_u.h @@ -12,10 +12,6 @@ namespace Core { class System; } -namespace Kernel { -class HLERequestContext; -} - namespace AudioCore::AudioOut { class Manager; class In; @@ -29,11 +25,11 @@ public: ~AudInU() override; private: - void ListAudioIns(Kernel::HLERequestContext& ctx); - void ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx); - void OpenInOutImpl(Kernel::HLERequestContext& ctx); - void OpenAudioIn(Kernel::HLERequestContext& ctx); - void OpenAudioInProtocolSpecified(Kernel::HLERequestContext& ctx); + void ListAudioIns(HLERequestContext& ctx); + void ListAudioInsAutoFiltered(HLERequestContext& ctx); + void OpenInOutImpl(HLERequestContext& ctx); + void OpenAudioIn(HLERequestContext& ctx); + void OpenAudioInProtocolSpecified(HLERequestContext& ctx); KernelHelpers::ServiceContext service_context; std::unique_ptr<AudioCore::AudioIn::Manager> impl; diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 991e30ba1..23b8be993 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -12,10 +12,10 @@ #include "common/string_util.h" #include "common/swap.h" #include "core/core.h" -#include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_event.h" #include "core/hle/service/audio/audout_u.h" #include "core/hle/service/audio/errors.h" +#include "core/hle/service/ipc_helpers.h" #include "core/memory.h" namespace Service::Audio { @@ -67,7 +67,7 @@ public: } private: - void GetAudioOutState(Kernel::HLERequestContext& ctx) { + void GetAudioOutState(HLERequestContext& ctx) { const auto state = static_cast<u32>(impl->GetState()); LOG_DEBUG(Service_Audio, "called. State={}", state); @@ -77,7 +77,7 @@ private: rb.Push(state); } - void Start(Kernel::HLERequestContext& ctx) { + void Start(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); auto result = impl->StartSystem(); @@ -86,7 +86,7 @@ private: rb.Push(result); } - void Stop(Kernel::HLERequestContext& ctx) { + void Stop(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); auto result = impl->StopSystem(); @@ -95,7 +95,7 @@ private: rb.Push(result); } - void AppendAudioOutBuffer(Kernel::HLERequestContext& ctx) { + void AppendAudioOutBuffer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; u64 tag = rp.PopRaw<u64>(); @@ -117,7 +117,7 @@ private: rb.Push(result); } - void RegisterBufferEvent(Kernel::HLERequestContext& ctx) { + void RegisterBufferEvent(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); auto& buffer_event = impl->GetBufferEvent(); @@ -127,7 +127,7 @@ private: rb.PushCopyObjects(buffer_event); } - void GetReleasedAudioOutBuffers(Kernel::HLERequestContext& ctx) { + void GetReleasedAudioOutBuffers(HLERequestContext& ctx) { const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>(); std::vector<u64> released_buffers(write_buffer_size); @@ -147,7 +147,7 @@ private: rb.Push(count); } - void ContainsAudioOutBuffer(Kernel::HLERequestContext& ctx) { + void ContainsAudioOutBuffer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 tag{rp.Pop<u64>()}; @@ -160,7 +160,7 @@ private: rb.Push(buffer_queued); } - void GetAudioOutBufferCount(Kernel::HLERequestContext& ctx) { + void GetAudioOutBufferCount(HLERequestContext& ctx) { const auto buffer_count = impl->GetBufferCount(); LOG_DEBUG(Service_Audio, "called. Buffer count={}", buffer_count); @@ -171,7 +171,7 @@ private: rb.Push(buffer_count); } - void GetAudioOutPlayedSampleCount(Kernel::HLERequestContext& ctx) { + void GetAudioOutPlayedSampleCount(HLERequestContext& ctx) { const auto samples_played = impl->GetPlayedSampleCount(); LOG_DEBUG(Service_Audio, "called. Played samples={}", samples_played); @@ -182,7 +182,7 @@ private: rb.Push(samples_played); } - void FlushAudioOutBuffers(Kernel::HLERequestContext& ctx) { + void FlushAudioOutBuffers(HLERequestContext& ctx) { bool flushed{impl->FlushAudioOutBuffers()}; LOG_DEBUG(Service_Audio, "called. Were any buffers flushed? {}", flushed); @@ -192,7 +192,7 @@ private: rb.Push(flushed); } - void SetAudioOutVolume(Kernel::HLERequestContext& ctx) { + void SetAudioOutVolume(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto volume = rp.Pop<f32>(); @@ -204,7 +204,7 @@ private: rb.Push(ResultSuccess); } - void GetAudioOutVolume(Kernel::HLERequestContext& ctx) { + void GetAudioOutVolume(HLERequestContext& ctx) { const auto volume = impl->GetVolume(); LOG_DEBUG(Service_Audio, "called. Volume={}", volume); @@ -236,7 +236,7 @@ AudOutU::AudOutU(Core::System& system_) AudOutU::~AudOutU() = default; -void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) { +void AudOutU::ListAudioOuts(HLERequestContext& ctx) { using namespace AudioCore::AudioRenderer; std::scoped_lock l{impl->mutex}; @@ -258,7 +258,7 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) { rb.Push<u32>(static_cast<u32>(device_names.size())); } -void AudOutU::OpenAudioOut(Kernel::HLERequestContext& ctx) { +void AudOutU::OpenAudioOut(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; auto in_params{rp.PopRaw<AudioOutParameter>()}; auto applet_resource_user_id{rp.PopRaw<u64>()}; diff --git a/src/core/hle/service/audio/audout_u.h b/src/core/hle/service/audio/audout_u.h index fdc0ee754..8f288c6e0 100644 --- a/src/core/hle/service/audio/audout_u.h +++ b/src/core/hle/service/audio/audout_u.h @@ -12,10 +12,6 @@ namespace Core { class System; } -namespace Kernel { -class HLERequestContext; -} - namespace AudioCore::AudioOut { class Manager; class Out; @@ -31,8 +27,8 @@ public: ~AudOutU() override; private: - void ListAudioOuts(Kernel::HLERequestContext& ctx); - void OpenAudioOut(Kernel::HLERequestContext& ctx); + void ListAudioOuts(HLERequestContext& ctx); + void OpenAudioOut(HLERequestContext& ctx); KernelHelpers::ServiceContext service_context; std::unique_ptr<AudioCore::AudioOut::Manager> impl; diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 6c12f00a1..0a6830ffa 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp @@ -17,12 +17,12 @@ #include "common/polyfill_ranges.h" #include "common/string_util.h" #include "core/core.h" -#include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_process.h" #include "core/hle/kernel/k_transfer_memory.h" #include "core/hle/service/audio/audren_u.h" #include "core/hle/service/audio/errors.h" +#include "core/hle/service/ipc_helpers.h" #include "core/memory.h" using namespace AudioCore::AudioRenderer; @@ -68,7 +68,7 @@ public: } private: - void GetSampleRate(Kernel::HLERequestContext& ctx) { + void GetSampleRate(HLERequestContext& ctx) { const auto sample_rate{impl->GetSystem().GetSampleRate()}; LOG_DEBUG(Service_Audio, "called. Sample rate {}", sample_rate); @@ -78,7 +78,7 @@ private: rb.Push(sample_rate); } - void GetSampleCount(Kernel::HLERequestContext& ctx) { + void GetSampleCount(HLERequestContext& ctx) { const auto sample_count{impl->GetSystem().GetSampleCount()}; LOG_DEBUG(Service_Audio, "called. Sample count {}", sample_count); @@ -88,7 +88,7 @@ private: rb.Push(sample_count); } - void GetState(Kernel::HLERequestContext& ctx) { + void GetState(HLERequestContext& ctx) { const u32 state{!impl->GetSystem().IsActive()}; LOG_DEBUG(Service_Audio, "called, state {}", state); @@ -98,7 +98,7 @@ private: rb.Push(state); } - void GetMixBufferCount(Kernel::HLERequestContext& ctx) { + void GetMixBufferCount(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); const auto buffer_count{impl->GetSystem().GetMixBufferCount()}; @@ -108,7 +108,7 @@ private: rb.Push(buffer_count); } - void RequestUpdate(Kernel::HLERequestContext& ctx) { + void RequestUpdate(HLERequestContext& ctx) { LOG_TRACE(Service_Audio, "called"); const auto input{ctx.ReadBuffer(0)}; @@ -147,7 +147,7 @@ private: rb.Push(result); } - void Start(Kernel::HLERequestContext& ctx) { + void Start(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); impl->Start(); @@ -156,7 +156,7 @@ private: rb.Push(ResultSuccess); } - void Stop(Kernel::HLERequestContext& ctx) { + void Stop(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); impl->Stop(); @@ -165,7 +165,7 @@ private: rb.Push(ResultSuccess); } - void QuerySystemEvent(Kernel::HLERequestContext& ctx) { + void QuerySystemEvent(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); if (impl->GetSystem().GetExecutionMode() == AudioCore::ExecutionMode::Manual) { @@ -179,7 +179,7 @@ private: rb.PushCopyObjects(rendered_event->GetReadableEvent()); } - void SetRenderingTimeLimit(Kernel::HLERequestContext& ctx) { + void SetRenderingTimeLimit(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); IPC::RequestParser rp{ctx}; @@ -192,7 +192,7 @@ private: rb.Push(ResultSuccess); } - void GetRenderingTimeLimit(Kernel::HLERequestContext& ctx) { + void GetRenderingTimeLimit(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); auto& system_ = impl->GetSystem(); @@ -203,11 +203,11 @@ private: rb.Push(time); } - void ExecuteAudioRendererRendering(Kernel::HLERequestContext& ctx) { + void ExecuteAudioRendererRendering(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); } - void SetVoiceDropParameter(Kernel::HLERequestContext& ctx) { + void SetVoiceDropParameter(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); IPC::RequestParser rp{ctx}; @@ -220,7 +220,7 @@ private: rb.Push(ResultSuccess); } - void GetVoiceDropParameter(Kernel::HLERequestContext& ctx) { + void GetVoiceDropParameter(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); auto& system_ = impl->GetSystem(); @@ -271,7 +271,7 @@ public: } private: - void ListAudioDeviceName(Kernel::HLERequestContext& ctx) { + void ListAudioDeviceName(HLERequestContext& ctx) { const size_t in_count = ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>(); std::vector<AudioDevice::AudioDeviceName> out_names{}; @@ -299,7 +299,7 @@ private: rb.Push(out_count); } - void SetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) { + void SetAudioDeviceOutputVolume(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const f32 volume = rp.Pop<f32>(); @@ -316,7 +316,7 @@ private: rb.Push(ResultSuccess); } - void GetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) { + void GetAudioDeviceOutputVolume(HLERequestContext& ctx) { const auto device_name_buffer = ctx.ReadBuffer(); const std::string name = Common::StringFromBuffer(device_name_buffer); @@ -332,7 +332,7 @@ private: rb.Push(volume); } - void GetActiveAudioDeviceName(Kernel::HLERequestContext& ctx) { + void GetActiveAudioDeviceName(HLERequestContext& ctx) { const auto write_size = ctx.GetWriteBufferSize(); std::string out_name{"AudioTvOutput"}; @@ -346,7 +346,7 @@ private: rb.Push(ResultSuccess); } - void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) { + void QueryAudioDeviceSystemEvent(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "(STUBBED) called"); event->Signal(); @@ -356,7 +356,7 @@ private: rb.PushCopyObjects(event->GetReadableEvent()); } - void GetActiveChannelCount(Kernel::HLERequestContext& ctx) { + void GetActiveChannelCount(HLERequestContext& ctx) { const auto& sink{system.AudioCore().GetOutputSink()}; u32 channel_count{sink.GetDeviceChannels()}; @@ -368,7 +368,7 @@ private: rb.Push<u32>(channel_count); } - void QueryAudioDeviceInputEvent(Kernel::HLERequestContext& ctx) { + void QueryAudioDeviceInputEvent(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2, 1}; @@ -376,7 +376,7 @@ private: rb.PushCopyObjects(event->GetReadableEvent()); } - void QueryAudioDeviceOutputEvent(Kernel::HLERequestContext& ctx) { + void QueryAudioDeviceOutputEvent(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 2, 1}; @@ -384,7 +384,7 @@ private: rb.PushCopyObjects(event->GetReadableEvent()); } - void ListAudioOutputDeviceName(Kernel::HLERequestContext& ctx) { + void ListAudioOutputDeviceName(HLERequestContext& ctx) { const size_t in_count = ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>(); std::vector<AudioDevice::AudioDeviceName> out_names{}; @@ -435,7 +435,7 @@ AudRenU::AudRenU(Core::System& system_) AudRenU::~AudRenU() = default; -void AudRenU::OpenAudioRenderer(Kernel::HLERequestContext& ctx) { +void AudRenU::OpenAudioRenderer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; AudioCore::AudioRendererParameterInternal params; @@ -475,7 +475,7 @@ void AudRenU::OpenAudioRenderer(Kernel::HLERequestContext& ctx) { applet_resource_user_id, session_id); } -void AudRenU::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { +void AudRenU::GetWorkBufferSize(HLERequestContext& ctx) { AudioCore::AudioRendererParameterInternal params; IPC::RequestParser rp{ctx}; @@ -506,7 +506,7 @@ void AudRenU::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { rb.Push<u64>(size); } -void AudRenU::GetAudioDeviceService(Kernel::HLERequestContext& ctx) { +void AudRenU::GetAudioDeviceService(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto applet_resource_user_id = rp.Pop<u64>(); @@ -520,11 +520,11 @@ void AudRenU::GetAudioDeviceService(Kernel::HLERequestContext& ctx) { ::Common::MakeMagic('R', 'E', 'V', '1'), num_audio_devices++); } -void AudRenU::OpenAudioRendererForManualExecution(Kernel::HLERequestContext& ctx) { +void AudRenU::OpenAudioRendererForManualExecution(HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); } -void AudRenU::GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& ctx) { +void AudRenU::GetAudioDeviceServiceWithRevisionInfo(HLERequestContext& ctx) { struct Parameters { u32 revision; u64 applet_resource_user_id; diff --git a/src/core/hle/service/audio/audren_u.h b/src/core/hle/service/audio/audren_u.h index 4384a9b3c..24ce37e87 100644 --- a/src/core/hle/service/audio/audren_u.h +++ b/src/core/hle/service/audio/audren_u.h @@ -11,10 +11,6 @@ namespace Core { class System; } -namespace Kernel { -class HLERequestContext; -} - namespace Service::Audio { class IAudioRenderer; @@ -24,11 +20,11 @@ public: ~AudRenU() override; private: - void OpenAudioRenderer(Kernel::HLERequestContext& ctx); - void GetWorkBufferSize(Kernel::HLERequestContext& ctx); - void GetAudioDeviceService(Kernel::HLERequestContext& ctx); - void OpenAudioRendererForManualExecution(Kernel::HLERequestContext& ctx); - void GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& ctx); + void OpenAudioRenderer(HLERequestContext& ctx); + void GetWorkBufferSize(HLERequestContext& ctx); + void GetAudioDeviceService(HLERequestContext& ctx); + void OpenAudioRendererForManualExecution(HLERequestContext& ctx); + void GetAudioDeviceServiceWithRevisionInfo(HLERequestContext& ctx); KernelHelpers::ServiceContext service_context; std::unique_ptr<AudioCore::AudioRenderer::Manager> impl; diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index 3db3fe188..451ac224a 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp @@ -11,8 +11,8 @@ #include "common/assert.h" #include "common/logging/log.h" -#include "core/hle/ipc_helpers.h" #include "core/hle/service/audio/hwopus.h" +#include "core/hle/service/ipc_helpers.h" namespace Service::Audio { namespace { @@ -53,7 +53,7 @@ public: // Decodes interleaved Opus packets. Optionally allows reporting time taken to // perform the decoding, as well as any relevant extra behavior. - void DecodeInterleaved(Kernel::HLERequestContext& ctx, PerfTime perf_time, + void DecodeInterleaved(HLERequestContext& ctx, PerfTime perf_time, ExtraBehavior extra_behavior) { if (perf_time == PerfTime::Disabled) { DecodeInterleavedHelper(ctx, nullptr, extra_behavior); @@ -64,7 +64,7 @@ public: } private: - void DecodeInterleavedHelper(Kernel::HLERequestContext& ctx, u64* performance, + void DecodeInterleavedHelper(HLERequestContext& ctx, u64* performance, ExtraBehavior extra_behavior) { u32 consumed = 0; u32 sample_count = 0; @@ -180,21 +180,21 @@ public: } private: - void DecodeInterleavedOld(Kernel::HLERequestContext& ctx) { + void DecodeInterleavedOld(HLERequestContext& ctx) { LOG_DEBUG(Audio, "called"); decoder_state.DecodeInterleaved(ctx, OpusDecoderState::PerfTime::Disabled, OpusDecoderState::ExtraBehavior::None); } - void DecodeInterleavedWithPerfOld(Kernel::HLERequestContext& ctx) { + void DecodeInterleavedWithPerfOld(HLERequestContext& ctx) { LOG_DEBUG(Audio, "called"); decoder_state.DecodeInterleaved(ctx, OpusDecoderState::PerfTime::Enabled, OpusDecoderState::ExtraBehavior::None); } - void DecodeInterleaved(Kernel::HLERequestContext& ctx) { + void DecodeInterleaved(HLERequestContext& ctx) { LOG_DEBUG(Audio, "called"); IPC::RequestParser rp{ctx}; @@ -231,7 +231,7 @@ std::array<u8, 2> CreateMappingTable(u32 channel_count) { } } // Anonymous namespace -void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { +void HwOpus::GetWorkBufferSize(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto sample_rate = rp.Pop<u32>(); const auto channel_count = rp.Pop<u32>(); @@ -251,11 +251,11 @@ void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { rb.Push<u32>(worker_buffer_sz); } -void HwOpus::GetWorkBufferSizeEx(Kernel::HLERequestContext& ctx) { +void HwOpus::GetWorkBufferSizeEx(HLERequestContext& ctx) { GetWorkBufferSize(ctx); } -void HwOpus::GetWorkBufferSizeForMultiStreamEx(Kernel::HLERequestContext& ctx) { +void HwOpus::GetWorkBufferSizeForMultiStreamEx(HLERequestContext& ctx) { OpusMultiStreamParametersEx param; std::memcpy(¶m, ctx.ReadBuffer().data(), ctx.GetReadBufferSize()); @@ -281,7 +281,7 @@ void HwOpus::GetWorkBufferSizeForMultiStreamEx(Kernel::HLERequestContext& ctx) { rb.Push<u32>(worker_buffer_sz); } -void HwOpus::OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx) { +void HwOpus::OpenHardwareOpusDecoder(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto sample_rate = rp.Pop<u32>(); const auto channel_count = rp.Pop<u32>(); @@ -319,7 +319,7 @@ void HwOpus::OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx) { system, OpusDecoderState{std::move(decoder), sample_rate, channel_count}); } -void HwOpus::OpenHardwareOpusDecoderEx(Kernel::HLERequestContext& ctx) { +void HwOpus::OpenHardwareOpusDecoderEx(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto sample_rate = rp.Pop<u32>(); const auto channel_count = rp.Pop<u32>(); diff --git a/src/core/hle/service/audio/hwopus.h b/src/core/hle/service/audio/hwopus.h index e6092e290..ece65c02c 100644 --- a/src/core/hle/service/audio/hwopus.h +++ b/src/core/hle/service/audio/hwopus.h @@ -27,11 +27,11 @@ public: ~HwOpus() override; private: - void OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx); - void OpenHardwareOpusDecoderEx(Kernel::HLERequestContext& ctx); - void GetWorkBufferSize(Kernel::HLERequestContext& ctx); - void GetWorkBufferSizeEx(Kernel::HLERequestContext& ctx); - void GetWorkBufferSizeForMultiStreamEx(Kernel::HLERequestContext& ctx); + void OpenHardwareOpusDecoder(HLERequestContext& ctx); + void OpenHardwareOpusDecoderEx(HLERequestContext& ctx); + void GetWorkBufferSize(HLERequestContext& ctx); + void GetWorkBufferSizeEx(HLERequestContext& ctx); + void GetWorkBufferSizeForMultiStreamEx(HLERequestContext& ctx); }; } // namespace Service::Audio |