diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-30 20:18:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 20:18:57 +0200 |
commit | 9cba0f1794976248edfbf5a701a802c9ae406bb8 (patch) | |
tree | dd28ca6f569fd7ac18f67430fcefb4e0193f4184 /src/core/hle/service/audio | |
parent | Merge pull request #290 from MerryMage/dfix-20180329 (diff) | |
parent | audren_u: Stub QueryAudioDeviceSystemEvent and GetActiveChannelCount. (diff) | |
download | yuzu-9cba0f1794976248edfbf5a701a802c9ae406bb8.tar yuzu-9cba0f1794976248edfbf5a701a802c9ae406bb8.tar.gz yuzu-9cba0f1794976248edfbf5a701a802c9ae406bb8.tar.bz2 yuzu-9cba0f1794976248edfbf5a701a802c9ae406bb8.tar.lz yuzu-9cba0f1794976248edfbf5a701a802c9ae406bb8.tar.xz yuzu-9cba0f1794976248edfbf5a701a802c9ae406bb8.tar.zst yuzu-9cba0f1794976248edfbf5a701a802c9ae406bb8.zip |
Diffstat (limited to 'src/core/hle/service/audio')
-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: AudioRendererResponseData response_data{}; response_data.section_0_size = - response_data.state_entries.size() * sizeof(AudioRendererStateEntry); - response_data.section_1_size = response_data.section_1.size(); - response_data.section_2_size = response_data.section_2.size(); - response_data.section_3_size = response_data.section_3.size(); - response_data.section_4_size = response_data.section_4.size(); - response_data.section_5_size = response_data.section_5.size(); + static_cast<u32>(response_data.state_entries.size() * sizeof(AudioRendererStateEntry)); + response_data.section_1_size = static_cast<u32>(response_data.section_1.size()); + response_data.section_2_size = static_cast<u32>(response_data.section_2.size()); + response_data.section_3_size = static_cast<u32>(response_data.section_3.size()); + response_data.section_4_size = static_cast<u32>(response_data.section_4.size()); + response_data.section_5_size = static_cast<u32>(response_data.section_5.size()); response_data.total_size = sizeof(AudioRendererResponseData); for (unsigned i = 0; i < response_data.state_entries.size(); i++) { @@ -156,7 +156,17 @@ public: IAudioDevice() : ServiceFramework("IAudioDevice") { static const FunctionInfo functions[] = { {0x0, &IAudioDevice::ListAudioDeviceName, "ListAudioDeviceName"}, - {0x1, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolume"}}; + {0x1, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolume"}, + {0x2, nullptr, "GetAudioDeviceOutputVolume"}, + {0x3, nullptr, "GetActiveAudioDeviceName"}, + {0x4, &IAudioDevice::QueryAudioDeviceSystemEvent, "QueryAudioDeviceSystemEvent"}, + {0x5, &IAudioDevice::GetActiveChannelCount, "GetActiveChannelCount"}, + {0x6, nullptr, "ListAudioDeviceNameAuto"}, + {0x7, nullptr, "SetAudioDeviceOutputVolumeAuto"}, + {0x8, nullptr, "GetAudioDeviceOutputVolumeAuto"}, + {0x10, nullptr, "GetActiveAudioDeviceNameAuto"}, + {0x11, nullptr, "QueryAudioDeviceInputEvent"}, + {0x12, nullptr, "QueryAudioDeviceOutputEvent"}}; RegisterHandlers(functions); buffer_event = @@ -189,8 +199,26 @@ private: rb.Push(RESULT_SUCCESS); } + void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_Audio, "(STUBBED) called"); + + buffer_event->Signal(); + + IPC::ResponseBuilder rb{ctx, 2, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushCopyObjects(buffer_event); + } + + void GetActiveChannelCount(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_Audio, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(RESULT_SUCCESS); + rb.Push<u32>(1); + } + Kernel::SharedPtr<Kernel::Event> buffer_event; -}; + +}; // namespace Audio AudRenU::AudRenU() : ServiceFramework("audren:u") { static const FunctionInfo functions[] = { |