summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/audio/audctl.h
blob: 4c90ead70e27fd185dcc54ec3b435667322477f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "core/hle/service/service.h"

namespace Core {
class System;
}

namespace Service::Set {
class ISystemSettingsServer;
}

namespace Service::Audio {

class AudCtl final : public ServiceFramework<AudCtl> {
public:
    explicit AudCtl(Core::System& system_);
    ~AudCtl() override;

private:
    enum class ForceMutePolicy {
        Disable,
        SpeakerMuteOnHeadphoneUnplugged,
    };

    enum class HeadphoneOutputLevelMode {
        Normal,
        HighPower,
    };

    void GetTargetVolumeMin(HLERequestContext& ctx);
    void GetTargetVolumeMax(HLERequestContext& ctx);
    void GetAudioOutputMode(HLERequestContext& ctx);
    void SetAudioOutputMode(HLERequestContext& ctx);
    void GetForceMutePolicy(HLERequestContext& ctx);
    void GetOutputModeSetting(HLERequestContext& ctx);
    void SetOutputModeSetting(HLERequestContext& ctx);
    void SetHeadphoneOutputLevelMode(HLERequestContext& ctx);
    void GetHeadphoneOutputLevelMode(HLERequestContext& ctx);
    void SetSpeakerAutoMuteEnabled(HLERequestContext& ctx);
    void IsSpeakerAutoMuteEnabled(HLERequestContext& ctx);
    void AcquireTargetNotification(HLERequestContext& ctx);

    std::shared_ptr<Service::Set::ISystemSettingsServer> m_set_sys;
};

} // namespace Service::Audio