diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2024-02-15 02:51:07 +0100 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2024-02-17 22:05:13 +0100 |
commit | 4cbafc1ef60e7edcf736c27607b840c869918f83 (patch) | |
tree | 08c0ec1c9777899af1e3776ed4483bb943c19528 /src/core/hle/service/audio/audio_controller.h | |
parent | Merge pull request #13016 from german77/set-interface2 (diff) | |
download | yuzu-4cbafc1ef60e7edcf736c27607b840c869918f83.tar yuzu-4cbafc1ef60e7edcf736c27607b840c869918f83.tar.gz yuzu-4cbafc1ef60e7edcf736c27607b840c869918f83.tar.bz2 yuzu-4cbafc1ef60e7edcf736c27607b840c869918f83.tar.lz yuzu-4cbafc1ef60e7edcf736c27607b840c869918f83.tar.xz yuzu-4cbafc1ef60e7edcf736c27607b840c869918f83.tar.zst yuzu-4cbafc1ef60e7edcf736c27607b840c869918f83.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/audio/audio_controller.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/core/hle/service/audio/audio_controller.h b/src/core/hle/service/audio/audio_controller.h new file mode 100644 index 000000000..9e8514373 --- /dev/null +++ b/src/core/hle/service/audio/audio_controller.h @@ -0,0 +1,58 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/cmif_types.h" +#include "core/hle/service/service.h" +#include "core/hle/service/set/settings_types.h" + +namespace Core { +class System; +} + +namespace Service::Set { +class ISystemSettingsServer; +} + +namespace Service::Audio { + +class IAudioController final : public ServiceFramework<IAudioController> { +public: + explicit IAudioController(Core::System& system_); + ~IAudioController() override; + +private: + enum class ForceMutePolicy { + Disable, + SpeakerMuteOnHeadphoneUnplugged, + }; + + enum class HeadphoneOutputLevelMode { + Normal, + HighPower, + }; + + Result GetTargetVolumeMin(Out<s32> out_target_min_volume); + Result GetTargetVolumeMax(Out<s32> out_target_max_volume); + Result GetAudioOutputMode(Out<Set::AudioOutputMode> out_output_mode, + Set::AudioOutputModeTarget target); + Result SetAudioOutputMode(Set::AudioOutputModeTarget target, Set::AudioOutputMode output_mode); + Result GetForceMutePolicy(Out<ForceMutePolicy> out_mute_policy); + Result GetOutputModeSetting(Out<Set::AudioOutputMode> out_output_mode, + Set::AudioOutputModeTarget target); + Result SetOutputModeSetting(Set::AudioOutputModeTarget target, + Set::AudioOutputMode output_mode); + Result SetHeadphoneOutputLevelMode(HeadphoneOutputLevelMode output_level_mode); + Result GetHeadphoneOutputLevelMode(Out<HeadphoneOutputLevelMode> out_output_level_mode); + Result SetSpeakerAutoMuteEnabled(bool is_speaker_auto_mute_enabled); + Result IsSpeakerAutoMuteEnabled(Out<bool> out_is_speaker_auto_mute_enabled); + Result AcquireTargetNotification(OutCopyHandle<Kernel::KReadableEvent> out_notification_event); + + KernelHelpers::ServiceContext service_context; + + Kernel::KEvent* notification_event; + std::shared_ptr<Service::Set::ISystemSettingsServer> m_set_sys; +}; + +} // namespace Service::Audio |