// 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 { public: explicit IAudioController(Core::System& system_); ~IAudioController() override; private: enum class ForceMutePolicy { Disable, SpeakerMuteOnHeadphoneUnplugged, }; enum class HeadphoneOutputLevelMode { Normal, HighPower, }; Result GetTargetVolumeMin(Out out_target_min_volume); Result GetTargetVolumeMax(Out out_target_max_volume); Result GetAudioOutputMode(Out out_output_mode, Set::AudioOutputModeTarget target); Result SetAudioOutputMode(Set::AudioOutputModeTarget target, Set::AudioOutputMode output_mode); Result GetForceMutePolicy(Out out_mute_policy); Result GetOutputModeSetting(Out out_output_mode, Set::AudioOutputModeTarget target); Result SetOutputModeSetting(Set::AudioOutputModeTarget target, Set::AudioOutputMode output_mode); Result SetHeadphoneOutputLevelMode(HeadphoneOutputLevelMode output_level_mode); Result GetHeadphoneOutputLevelMode(Out out_output_level_mode); Result SetSpeakerAutoMuteEnabled(bool is_speaker_auto_mute_enabled); Result IsSpeakerAutoMuteEnabled(Out out_is_speaker_auto_mute_enabled); Result AcquireTargetNotification(OutCopyHandle out_notification_event); KernelHelpers::ServiceContext service_context; Kernel::KEvent* notification_event; std::shared_ptr m_set_sys; }; } // namespace Service::Audio