diff options
author | Liam <byteslice@airmail.cc> | 2024-02-20 06:46:35 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-21 04:15:37 +0100 |
commit | 62083fcafd11348e01cf0d99e2693cb608cca71b (patch) | |
tree | eca4183bdc0d8b299c7ffdfa879d4e1acaffb773 /src/core/hle/service/audio/audio_renderer.h | |
parent | audio: move IFinalOutputRecorderManager{,ForApplet} (diff) | |
download | yuzu-62083fcafd11348e01cf0d99e2693cb608cca71b.tar yuzu-62083fcafd11348e01cf0d99e2693cb608cca71b.tar.gz yuzu-62083fcafd11348e01cf0d99e2693cb608cca71b.tar.bz2 yuzu-62083fcafd11348e01cf0d99e2693cb608cca71b.tar.lz yuzu-62083fcafd11348e01cf0d99e2693cb608cca71b.tar.xz yuzu-62083fcafd11348e01cf0d99e2693cb608cca71b.tar.zst yuzu-62083fcafd11348e01cf0d99e2693cb608cca71b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/audio/audio_renderer.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/core/hle/service/audio/audio_renderer.h b/src/core/hle/service/audio/audio_renderer.h new file mode 100644 index 000000000..f8c48154b --- /dev/null +++ b/src/core/hle/service/audio/audio_renderer.h @@ -0,0 +1,45 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "audio_core/renderer/audio_renderer.h" +#include "core/hle/service/kernel_helpers.h" +#include "core/hle/service/service.h" + +namespace Service::Audio { + +class IAudioRenderer final : public ServiceFramework<IAudioRenderer> { +public: + explicit IAudioRenderer(Core::System& system_, AudioCore::Renderer::Manager& manager_, + AudioCore::AudioRendererParameterInternal& params, + Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size, + u32 process_handle, Kernel::KProcess& process_, + u64 applet_resource_user_id, s32 session_id); + ~IAudioRenderer() override; + +private: + void GetSampleRate(HLERequestContext& ctx); + void GetSampleCount(HLERequestContext& ctx); + void GetState(HLERequestContext& ctx); + void GetMixBufferCount(HLERequestContext& ctx); + void RequestUpdate(HLERequestContext& ctx); + void Start(HLERequestContext& ctx); + void Stop(HLERequestContext& ctx); + void QuerySystemEvent(HLERequestContext& ctx); + void SetRenderingTimeLimit(HLERequestContext& ctx); + void GetRenderingTimeLimit(HLERequestContext& ctx); + void ExecuteAudioRendererRendering(HLERequestContext& ctx); + void SetVoiceDropParameter(HLERequestContext& ctx); + void GetVoiceDropParameter(HLERequestContext& ctx); + + KernelHelpers::ServiceContext service_context; + Kernel::KEvent* rendered_event; + AudioCore::Renderer::Manager& manager; + std::unique_ptr<AudioCore::Renderer::Renderer> impl; + Kernel::KProcess& process; + Common::ScratchBuffer<u8> output_buffer; + Common::ScratchBuffer<u8> performance_buffer; +}; + +} // namespace Service::Audio |