diff options
| author | 2019-09-05 09:51:50 +1000 | |
|---|---|---|
| committer | 2019-09-05 09:51:50 +1000 | |
| commit | d8e59a28ea8e566ce800f84aabd399bc511b7d36 (patch) | |
| tree | 1b086e5260b2f4af52d420969a24b2383e017e1a /src | |
| parent | Merge pull request #2836 from Morph1984/hid_vibration (diff) | |
| parent | Add Kernel::EventPair audio_input_device_switch_event; (diff) | |
| download | yuzu-d8e59a28ea8e566ce800f84aabd399bc511b7d36.tar.gz yuzu-d8e59a28ea8e566ce800f84aabd399bc511b7d36.tar.xz yuzu-d8e59a28ea8e566ce800f84aabd399bc511b7d36.zip | |
Merge pull request #2834 from Morph1984/audrenu_QueryAudioDeviceInputEvent
audren_u: Stub IAudioDevice::QueryAudioDeviceInputEvent
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index b4bd9adf0..f162249ed 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -173,7 +173,7 @@ public: | |||
| 173 | {7, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolumeAuto"}, | 173 | {7, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolumeAuto"}, |
| 174 | {8, &IAudioDevice::GetAudioDeviceOutputVolume, "GetAudioDeviceOutputVolumeAuto"}, | 174 | {8, &IAudioDevice::GetAudioDeviceOutputVolume, "GetAudioDeviceOutputVolumeAuto"}, |
| 175 | {10, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceNameAuto"}, | 175 | {10, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceNameAuto"}, |
| 176 | {11, nullptr, "QueryAudioDeviceInputEvent"}, | 176 | {11, &IAudioDevice::QueryAudioDeviceInputEvent, "QueryAudioDeviceInputEvent"}, |
| 177 | {12, &IAudioDevice::QueryAudioDeviceOutputEvent, "QueryAudioDeviceOutputEvent"}, | 177 | {12, &IAudioDevice::QueryAudioDeviceOutputEvent, "QueryAudioDeviceOutputEvent"}, |
| 178 | {13, nullptr, "GetAudioSystemMasterVolumeSetting"}, | 178 | {13, nullptr, "GetAudioSystemMasterVolumeSetting"}, |
| 179 | }; | 179 | }; |
| @@ -183,6 +183,10 @@ public: | |||
| 183 | buffer_event = Kernel::WritableEvent::CreateEventPair(kernel, Kernel::ResetType::Automatic, | 183 | buffer_event = Kernel::WritableEvent::CreateEventPair(kernel, Kernel::ResetType::Automatic, |
| 184 | "IAudioOutBufferReleasedEvent"); | 184 | "IAudioOutBufferReleasedEvent"); |
| 185 | 185 | ||
| 186 | // Should be similar to audio_output_device_switch_event | ||
| 187 | audio_input_device_switch_event = Kernel::WritableEvent::CreateEventPair( | ||
| 188 | kernel, Kernel::ResetType::Automatic, "IAudioDevice:AudioInputDeviceSwitchedEvent"); | ||
| 189 | |||
| 186 | // Should only be signalled when an audio output device has been changed, example: speaker | 190 | // Should only be signalled when an audio output device has been changed, example: speaker |
| 187 | // to headset | 191 | // to headset |
| 188 | audio_output_device_switch_event = Kernel::WritableEvent::CreateEventPair( | 192 | audio_output_device_switch_event = Kernel::WritableEvent::CreateEventPair( |
| @@ -292,6 +296,15 @@ private: | |||
| 292 | rb.Push<u32>(1); | 296 | rb.Push<u32>(1); |
| 293 | } | 297 | } |
| 294 | 298 | ||
| 299 | // Should be similar to QueryAudioDeviceOutputEvent | ||
| 300 | void QueryAudioDeviceInputEvent(Kernel::HLERequestContext& ctx) { | ||
| 301 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | ||
| 302 | |||
| 303 | IPC::ResponseBuilder rb{ctx, 2, 1}; | ||
| 304 | rb.Push(RESULT_SUCCESS); | ||
| 305 | rb.PushCopyObjects(audio_input_device_switch_event.readable); | ||
| 306 | } | ||
| 307 | |||
| 295 | void QueryAudioDeviceOutputEvent(Kernel::HLERequestContext& ctx) { | 308 | void QueryAudioDeviceOutputEvent(Kernel::HLERequestContext& ctx) { |
| 296 | LOG_DEBUG(Service_Audio, "called"); | 309 | LOG_DEBUG(Service_Audio, "called"); |
| 297 | 310 | ||
| @@ -302,6 +315,7 @@ private: | |||
| 302 | 315 | ||
| 303 | u32_le revision = 0; | 316 | u32_le revision = 0; |
| 304 | Kernel::EventPair buffer_event; | 317 | Kernel::EventPair buffer_event; |
| 318 | Kernel::EventPair audio_input_device_switch_event; | ||
| 305 | Kernel::EventPair audio_output_device_switch_event; | 319 | Kernel::EventPair audio_output_device_switch_event; |
| 306 | 320 | ||
| 307 | }; // namespace Audio | 321 | }; // namespace Audio |