summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/audio/audin_u.cpp72
-rw-r--r--src/core/hle/service/audio/audin_u.h11
2 files changed, 57 insertions, 26 deletions
diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp
index 3e7fd6024..30fedcc8d 100644
--- a/src/core/hle/service/audio/audin_u.cpp
+++ b/src/core/hle/service/audio/audin_u.cpp
@@ -9,32 +9,52 @@
9 9
10namespace Service::Audio { 10namespace Service::Audio {
11 11
12class IAudioIn final : public ServiceFramework<IAudioIn> { 12IAudioIn::IAudioIn(Core::System& system_) : ServiceFramework{system_, "IAudioIn"} {
13public: 13 // clang-format off
14 explicit IAudioIn(Core::System& system_) : ServiceFramework{system_, "IAudioIn"} { 14 static const FunctionInfo functions[] = {
15 // clang-format off 15 {0, nullptr, "GetAudioInState"},
16 static const FunctionInfo functions[] = { 16 {1, &IAudioIn::Start, "Start"},
17 {0, nullptr, "GetAudioInState"}, 17 {2, nullptr, "Stop"},
18 {1, nullptr, "Start"}, 18 {3, nullptr, "AppendAudioInBuffer"},
19 {2, nullptr, "Stop"}, 19 {4, &IAudioIn::RegisterBufferEvent, "RegisterBufferEvent"},
20 {3, nullptr, "AppendAudioInBuffer"}, 20 {5, nullptr, "GetReleasedAudioInBuffer"},
21 {4, nullptr, "RegisterBufferEvent"}, 21 {6, nullptr, "ContainsAudioInBuffer"},
22 {5, nullptr, "GetReleasedAudioInBuffer"}, 22 {7, nullptr, "AppendUacInBuffer"},
23 {6, nullptr, "ContainsAudioInBuffer"}, 23 {8, &IAudioIn::AppendAudioInBufferAuto, "AppendAudioInBufferAuto"},
24 {7, nullptr, "AppendUacInBuffer"}, 24 {9, nullptr, "GetReleasedAudioInBuffersAuto"},
25 {8, nullptr, "AppendAudioInBufferAuto"}, 25 {10, nullptr, "AppendUacInBufferAuto"},
26 {9, nullptr, "GetReleasedAudioInBuffersAuto"}, 26 {11, nullptr, "GetAudioInBufferCount"},
27 {10, nullptr, "AppendUacInBufferAuto"}, 27 {12, nullptr, "SetDeviceGain"},
28 {11, nullptr, "GetAudioInBufferCount"}, 28 {13, nullptr, "GetDeviceGain"},
29 {12, nullptr, "SetDeviceGain"}, 29 {14, nullptr, "FlushAudioInBuffers"},
30 {13, nullptr, "GetDeviceGain"}, 30 };
31 {14, nullptr, "FlushAudioInBuffers"}, 31 // clang-format on
32 }; 32
33 // clang-format on 33 RegisterHandlers(functions);
34 34}
35 RegisterHandlers(functions); 35
36 } 36IAudioIn::~IAudioIn() = default;
37}; 37
38void IAudioIn::Start(Kernel::HLERequestContext& ctx) {
39 LOG_WARNING(Service_Audio, "(STUBBED) called");
40
41 IPC::ResponseBuilder rb{ctx, 2};
42 rb.Push(ResultSuccess);
43}
44
45void IAudioIn::RegisterBufferEvent(Kernel::HLERequestContext& ctx) {
46 LOG_WARNING(Service_Audio, "(STUBBED) called");
47
48 IPC::ResponseBuilder rb{ctx, 2};
49 rb.Push(ResultSuccess);
50}
51
52void IAudioIn::AppendAudioInBufferAuto(Kernel::HLERequestContext& ctx) {
53 LOG_WARNING(Service_Audio, "(STUBBED) called");
54
55 IPC::ResponseBuilder rb{ctx, 2};
56 rb.Push(ResultSuccess);
57}
38 58
39AudInU::AudInU(Core::System& system_) : ServiceFramework{system_, "audin:u"} { 59AudInU::AudInU(Core::System& system_) : ServiceFramework{system_, "audin:u"} {
40 // clang-format off 60 // clang-format off
diff --git a/src/core/hle/service/audio/audin_u.h b/src/core/hle/service/audio/audin_u.h
index 0d75ae5ac..bde8fe7b7 100644
--- a/src/core/hle/service/audio/audin_u.h
+++ b/src/core/hle/service/audio/audin_u.h
@@ -16,6 +16,17 @@ class HLERequestContext;
16 16
17namespace Service::Audio { 17namespace Service::Audio {
18 18
19class IAudioIn final : public ServiceFramework<IAudioIn> {
20public:
21 explicit IAudioIn(Core::System& system_);
22 ~IAudioIn() override;
23
24private:
25 void Start(Kernel::HLERequestContext& ctx);
26 void RegisterBufferEvent(Kernel::HLERequestContext& ctx);
27 void AppendAudioInBufferAuto(Kernel::HLERequestContext& ctx);
28};
29
19class AudInU final : public ServiceFramework<AudInU> { 30class AudInU final : public ServiceFramework<AudInU> {
20public: 31public:
21 explicit AudInU(Core::System& system_); 32 explicit AudInU(Core::System& system_);