summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-14 03:51:44 +0100
committerGitHub <noreply@github.com>2018-11-14 03:51:44 +0100
commita80467db572a979bf202f32f5f2e6e8068b328b2 (patch)
tree21be5cb95ed5724a879c1dc93f9dd542b02616b1
parentMerge pull request #1683 from lioncash/typo (diff)
parenthle/audren_u: Implement Get/SetRenderingTimeLimit (diff)
downloadyuzu-a80467db572a979bf202f32f5f2e6e8068b328b2.tar
yuzu-a80467db572a979bf202f32f5f2e6e8068b328b2.tar.gz
yuzu-a80467db572a979bf202f32f5f2e6e8068b328b2.tar.bz2
yuzu-a80467db572a979bf202f32f5f2e6e8068b328b2.tar.lz
yuzu-a80467db572a979bf202f32f5f2e6e8068b328b2.tar.xz
yuzu-a80467db572a979bf202f32f5f2e6e8068b328b2.tar.zst
yuzu-a80467db572a979bf202f32f5f2e6e8068b328b2.zip
-rw-r--r--src/core/hle/service/audio/audren_u.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp
index fac6785a5..35a8bef6c 100644
--- a/src/core/hle/service/audio/audren_u.cpp
+++ b/src/core/hle/service/audio/audren_u.cpp
@@ -32,8 +32,8 @@ public:
{5, &IAudioRenderer::Start, "Start"},
{6, &IAudioRenderer::Stop, "Stop"},
{7, &IAudioRenderer::QuerySystemEvent, "QuerySystemEvent"},
- {8, nullptr, "SetRenderingTimeLimit"},
- {9, nullptr, "GetRenderingTimeLimit"},
+ {8, &IAudioRenderer::SetRenderingTimeLimit, "SetRenderingTimeLimit"},
+ {9, &IAudioRenderer::GetRenderingTimeLimit, "GetRenderingTimeLimit"},
{10, nullptr, "RequestUpdateAuto"},
{11, nullptr, "ExecuteAudioRendererRendering"},
};
@@ -110,8 +110,29 @@ private:
LOG_WARNING(Service_Audio, "(STUBBED) called");
}
+ void SetRenderingTimeLimit(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+ rendering_time_limit_percent = rp.Pop<u32>();
+ ASSERT(rendering_time_limit_percent >= 0 && rendering_time_limit_percent <= 100);
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+
+ LOG_DEBUG(Service_Audio, "called. rendering_time_limit_percent={}",
+ rendering_time_limit_percent);
+ }
+
+ void GetRenderingTimeLimit(Kernel::HLERequestContext& ctx) {
+ LOG_DEBUG(Service_Audio, "called");
+
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push(rendering_time_limit_percent);
+ }
+
Kernel::SharedPtr<Kernel::Event> system_event;
std::unique_ptr<AudioCore::AudioRenderer> renderer;
+ u32 rendering_time_limit_percent = 100;
};
class IAudioDevice final : public ServiceFramework<IAudioDevice> {