diff options
author | Liam <byteslice@airmail.cc> | 2024-02-20 03:45:48 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-21 04:15:37 +0100 |
commit | 2a2c92f1819f44a86f452654398d0fc16806c438 (patch) | |
tree | 32607c7d8bbb0232fd496bf8e621e29a3abd0fcb /src/core/hle/service/audio/audio_in_manager.h | |
parent | audio: rewrite IAudioIn (diff) | |
download | yuzu-2a2c92f1819f44a86f452654398d0fc16806c438.tar yuzu-2a2c92f1819f44a86f452654398d0fc16806c438.tar.gz yuzu-2a2c92f1819f44a86f452654398d0fc16806c438.tar.bz2 yuzu-2a2c92f1819f44a86f452654398d0fc16806c438.tar.lz yuzu-2a2c92f1819f44a86f452654398d0fc16806c438.tar.xz yuzu-2a2c92f1819f44a86f452654398d0fc16806c438.tar.zst yuzu-2a2c92f1819f44a86f452654398d0fc16806c438.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/audio/audio_in_manager.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/core/hle/service/audio/audio_in_manager.h b/src/core/hle/service/audio/audio_in_manager.h new file mode 100644 index 000000000..2a983bc60 --- /dev/null +++ b/src/core/hle/service/audio/audio_in_manager.h @@ -0,0 +1,57 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "audio_core/audio_in_manager.h" +#include "audio_core/in/audio_in_system.h" +#include "core/hle/service/cmif_types.h" +#include "core/hle/service/service.h" + +namespace Service::Audio { + +using AudioDeviceName = AudioCore::Renderer::AudioDevice::AudioDeviceName; +using Protocol = std::array<u32, 2>; + +class IAudioIn; + +class IAudioInManager final : public ServiceFramework<IAudioInManager> { +public: + explicit IAudioInManager(Core::System& system_); + ~IAudioInManager() override; + +private: + Result ListAudioIns(OutArray<AudioDeviceName, BufferAttr_HipcMapAlias> out_audio_ins, + Out<u32> out_count); + Result OpenAudioIn(Out<AudioCore::AudioIn::AudioInParameterInternal> out_parameter_internal, + Out<SharedPointer<IAudioIn>> out_audio_in, + OutArray<AudioDeviceName, BufferAttr_HipcMapAlias> out_name, + InArray<AudioDeviceName, BufferAttr_HipcMapAlias> name, + AudioCore::AudioIn::AudioInParameter parameter, + InCopyHandle<Kernel::KProcess> process_handle, + ClientAppletResourceUserId aruid); + + Result ListAudioInsAuto(OutArray<AudioDeviceName, BufferAttr_HipcAutoSelect> out_audio_ins, + Out<u32> out_count); + Result OpenAudioInAuto(Out<AudioCore::AudioIn::AudioInParameterInternal> out_parameter_internal, + Out<SharedPointer<IAudioIn>> out_audio_in, + OutArray<AudioDeviceName, BufferAttr_HipcAutoSelect> out_name, + InArray<AudioDeviceName, BufferAttr_HipcAutoSelect> name, + AudioCore::AudioIn::AudioInParameter parameter, + InCopyHandle<Kernel::KProcess> process_handle, + ClientAppletResourceUserId aruid); + + Result ListAudioInsAutoFiltered( + OutArray<AudioDeviceName, BufferAttr_HipcAutoSelect> out_audio_ins, Out<u32> out_count); + Result OpenAudioInProtocolSpecified( + Out<AudioCore::AudioIn::AudioInParameterInternal> out_parameter_internal, + Out<SharedPointer<IAudioIn>> out_audio_in, + OutArray<AudioDeviceName, BufferAttr_HipcAutoSelect> out_name, + InArray<AudioDeviceName, BufferAttr_HipcAutoSelect> name, Protocol protocol, + AudioCore::AudioIn::AudioInParameter parameter, + InCopyHandle<Kernel::KProcess> process_handle, ClientAppletResourceUserId aruid); + + std::unique_ptr<AudioCore::AudioIn::Manager> impl; +}; + +} // namespace Service::Audio |