diff options
| author | 2018-03-29 21:11:53 -0400 | |
|---|---|---|
| committer | 2018-03-29 21:23:24 -0400 | |
| commit | 86095e62cc9814db9b09d3aafff127558ecdc499 (patch) | |
| tree | dd28ca6f569fd7ac18f67430fcefb4e0193f4184 /src | |
| parent | svc: Stub GetThreadCoreMask. (diff) | |
| download | yuzu-86095e62cc9814db9b09d3aafff127558ecdc499.tar.gz yuzu-86095e62cc9814db9b09d3aafff127558ecdc499.tar.xz yuzu-86095e62cc9814db9b09d3aafff127558ecdc499.zip | |
audren_u: Stub QueryAudioDeviceSystemEvent and GetActiveChannelCount.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 44 |
1 files changed, 36 insertions, 8 deletions
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index f52cd7d90..6d0461bbc 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -59,12 +59,12 @@ private: | |||
| 59 | AudioRendererResponseData response_data{}; | 59 | AudioRendererResponseData response_data{}; |
| 60 | 60 | ||
| 61 | response_data.section_0_size = | 61 | response_data.section_0_size = |
| 62 | response_data.state_entries.size() * sizeof(AudioRendererStateEntry); | 62 | static_cast<u32>(response_data.state_entries.size() * sizeof(AudioRendererStateEntry)); |
| 63 | response_data.section_1_size = response_data.section_1.size(); | 63 | response_data.section_1_size = static_cast<u32>(response_data.section_1.size()); |
| 64 | response_data.section_2_size = response_data.section_2.size(); | 64 | response_data.section_2_size = static_cast<u32>(response_data.section_2.size()); |
| 65 | response_data.section_3_size = response_data.section_3.size(); | 65 | response_data.section_3_size = static_cast<u32>(response_data.section_3.size()); |
| 66 | response_data.section_4_size = response_data.section_4.size(); | 66 | response_data.section_4_size = static_cast<u32>(response_data.section_4.size()); |
| 67 | response_data.section_5_size = response_data.section_5.size(); | 67 | response_data.section_5_size = static_cast<u32>(response_data.section_5.size()); |
| 68 | response_data.total_size = sizeof(AudioRendererResponseData); | 68 | response_data.total_size = sizeof(AudioRendererResponseData); |
| 69 | 69 | ||
| 70 | for (unsigned i = 0; i < response_data.state_entries.size(); i++) { | 70 | for (unsigned i = 0; i < response_data.state_entries.size(); i++) { |
| @@ -156,7 +156,17 @@ public: | |||
| 156 | IAudioDevice() : ServiceFramework("IAudioDevice") { | 156 | IAudioDevice() : ServiceFramework("IAudioDevice") { |
| 157 | static const FunctionInfo functions[] = { | 157 | static const FunctionInfo functions[] = { |
| 158 | {0x0, &IAudioDevice::ListAudioDeviceName, "ListAudioDeviceName"}, | 158 | {0x0, &IAudioDevice::ListAudioDeviceName, "ListAudioDeviceName"}, |
| 159 | {0x1, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolume"}}; | 159 | {0x1, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolume"}, |
| 160 | {0x2, nullptr, "GetAudioDeviceOutputVolume"}, | ||
| 161 | {0x3, nullptr, "GetActiveAudioDeviceName"}, | ||
| 162 | {0x4, &IAudioDevice::QueryAudioDeviceSystemEvent, "QueryAudioDeviceSystemEvent"}, | ||
| 163 | {0x5, &IAudioDevice::GetActiveChannelCount, "GetActiveChannelCount"}, | ||
| 164 | {0x6, nullptr, "ListAudioDeviceNameAuto"}, | ||
| 165 | {0x7, nullptr, "SetAudioDeviceOutputVolumeAuto"}, | ||
| 166 | {0x8, nullptr, "GetAudioDeviceOutputVolumeAuto"}, | ||
| 167 | {0x10, nullptr, "GetActiveAudioDeviceNameAuto"}, | ||
| 168 | {0x11, nullptr, "QueryAudioDeviceInputEvent"}, | ||
| 169 | {0x12, nullptr, "QueryAudioDeviceOutputEvent"}}; | ||
| 160 | RegisterHandlers(functions); | 170 | RegisterHandlers(functions); |
| 161 | 171 | ||
| 162 | buffer_event = | 172 | buffer_event = |
| @@ -189,8 +199,26 @@ private: | |||
| 189 | rb.Push(RESULT_SUCCESS); | 199 | rb.Push(RESULT_SUCCESS); |
| 190 | } | 200 | } |
| 191 | 201 | ||
| 202 | void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) { | ||
| 203 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | ||
| 204 | |||
| 205 | buffer_event->Signal(); | ||
| 206 | |||
| 207 | IPC::ResponseBuilder rb{ctx, 2, 1}; | ||
| 208 | rb.Push(RESULT_SUCCESS); | ||
| 209 | rb.PushCopyObjects(buffer_event); | ||
| 210 | } | ||
| 211 | |||
| 212 | void GetActiveChannelCount(Kernel::HLERequestContext& ctx) { | ||
| 213 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | ||
| 214 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 215 | rb.Push(RESULT_SUCCESS); | ||
| 216 | rb.Push<u32>(1); | ||
| 217 | } | ||
| 218 | |||
| 192 | Kernel::SharedPtr<Kernel::Event> buffer_event; | 219 | Kernel::SharedPtr<Kernel::Event> buffer_event; |
| 193 | }; | 220 | |
| 221 | }; // namespace Audio | ||
| 194 | 222 | ||
| 195 | AudRenU::AudRenU() : ServiceFramework("audren:u") { | 223 | AudRenU::AudRenU() : ServiceFramework("audren:u") { |
| 196 | static const FunctionInfo functions[] = { | 224 | static const FunctionInfo functions[] = { |