From ba3af04da1ba020bdbb7285c8da73f75fcba68cc Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Mon, 21 Jun 2021 18:17:12 +0100 Subject: Implement audout GetAudioOutPlayedSampleCount Used in Ninja Gaiden games. --- src/core/hle/service/audio/audout_u.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 804c6b10c..92d4510b1 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -58,7 +58,7 @@ public: {7, &IAudioOut::AppendAudioOutBufferImpl, "AppendAudioOutBufferAuto"}, {8, &IAudioOut::GetReleasedAudioOutBufferImpl, "GetReleasedAudioOutBufferAuto"}, {9, &IAudioOut::GetAudioOutBufferCount, "GetAudioOutBufferCount"}, - {10, nullptr, "GetAudioOutPlayedSampleCount"}, + {10, &IAudioOut::GetAudioOutPlayedSampleCount, "GetAudioOutPlayedSampleCount"}, {11, &IAudioOut::FlushAudioOutBuffers, "FlushAudioOutBuffers"}, {12, &IAudioOut::SetAudioOutVolume, "SetAudioOutVolume"}, {13, &IAudioOut::GetAudioOutVolume, "GetAudioOutVolume"}, @@ -186,6 +186,14 @@ private: rb.Push(static_cast(stream->GetQueueSize())); } + void GetAudioOutPlayedSampleCount(Kernel::HLERequestContext& ctx) { + LOG_DEBUG(Service_Audio, "called"); + + IPC::ResponseBuilder rb{ctx, 4}; + rb.Push(ResultSuccess); + rb.Push(stream->GetPlayedSampleCount()); + } + void FlushAudioOutBuffers(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); -- cgit v1.2.3