aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2023-08-30 22:04:25 +0200
committerGitHub <noreply@github.com>2023-08-30 22:04:25 +0200
commit437c78e19840a9f4a9fdb4e491a8214019c536fe (patch)
tree4d7214a70b99b49622036bbc292d36038e65dbcc /src
parentf09bba82b9366e5912b639a610ae89cbb1cf352c (diff)
opus: Implement GetWorkBufferSizeExEx and GetWorkBufferSizeForMultiStreamExEx (#5624)1.1.1003
* opus: Implement GetWorkBufferSizeExEx and GetWorkBufferSizeForMultiStreamExEx * Fix comments
Diffstat (limited to 'src')
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Audio/IHardwareOpusDecoderManager.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Audio/IHardwareOpusDecoderManager.cs b/src/Ryujinx.HLE/HOS/Services/Audio/IHardwareOpusDecoderManager.cs
index b69a2392..514b51a5 100644
--- a/src/Ryujinx.HLE/HOS/Services/Audio/IHardwareOpusDecoderManager.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Audio/IHardwareOpusDecoderManager.cs
@@ -154,6 +154,28 @@ namespace Ryujinx.HLE.HOS.Services.Audio
return ResultCode.Success;
}
+ [CommandCmif(8)] // 16.0.0+
+ // GetWorkBufferSizeExEx(OpusParametersEx) -> u32
+ public ResultCode GetWorkBufferSizeExEx(ServiceCtx context)
+ {
+ // NOTE: GetWorkBufferSizeEx use hardcoded values to compute the returned size.
+ // GetWorkBufferSizeExEx fixes that by using dynamic values.
+ // Since we're already doing that, it's fine to call it directly.
+
+ return GetWorkBufferSizeEx(context);
+ }
+
+ [CommandCmif(9)] // 16.0.0+
+ // GetWorkBufferSizeForMultiStreamExEx(buffer<unknown<0x118>, 0x19>) -> u32
+ public ResultCode GetWorkBufferSizeForMultiStreamExEx(ServiceCtx context)
+ {
+ // NOTE: GetWorkBufferSizeForMultiStreamEx use hardcoded values to compute the returned size.
+ // GetWorkBufferSizeForMultiStreamExEx fixes that by using dynamic values.
+ // Since we're already doing that, it's fine to call it directly.
+
+ return GetWorkBufferSizeForMultiStreamEx(context);
+ }
+
private static int GetOpusMultistreamDecoderSize(int streams, int coupledStreams)
{
if (streams < 1 || coupledStreams > streams || coupledStreams < 0)