From a6412e1e3a7c132cada2a35ab2d6ee02cc4e7938 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Sun, 4 Nov 2018 20:29:38 -0500 Subject: [PATCH] Fixed swapped output raw fields in hwopusDecodeInterleaved, and also swapped those in the params. --- nx/include/switch/services/hwopus.h | 2 +- nx/source/services/hwopus.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nx/include/switch/services/hwopus.h b/nx/include/switch/services/hwopus.h index 30f4960e..212a46c9 100644 --- a/nx/include/switch/services/hwopus.h +++ b/nx/include/switch/services/hwopus.h @@ -17,5 +17,5 @@ typedef struct { Result hwopusDecoderInitialize(HwopusDecoder* decoder, s32 SampleRate, s32 ChannelCount); void hwopusDecoderExit(HwopusDecoder* decoder); -Result hwopusDecodeInterleaved(HwopusDecoder* decoder, s32 *DecodedSampleCount, u32 *DecodedDataSize, const void* opusin, size_t opusin_size, s16 *pcmbuf, size_t pcmbuf_size); +Result hwopusDecodeInterleaved(HwopusDecoder* decoder, s32 *DecodedDataSize, s32 *DecodedSampleCount, const void* opusin, size_t opusin_size, s16 *pcmbuf, size_t pcmbuf_size); diff --git a/nx/source/services/hwopus.c b/nx/source/services/hwopus.c index 78f6b85b..1b55ad94 100644 --- a/nx/source/services/hwopus.c +++ b/nx/source/services/hwopus.c @@ -120,7 +120,7 @@ static Result _hwopusGetWorkBufferSize(Service* srv, u32 *size, s32 SampleRate, return rc; } -Result hwopusDecodeInterleaved(HwopusDecoder* decoder, s32 *DecodedSampleCount, u32 *DecodedDataSize, const void* opusin, size_t opusin_size, s16 *pcmbuf, size_t pcmbuf_size) { +Result hwopusDecodeInterleaved(HwopusDecoder* decoder, s32 *DecodedDataSize, s32 *DecodedSampleCount, const void* opusin, size_t opusin_size, s16 *pcmbuf, size_t pcmbuf_size) { IpcCommand c; ipcInitialize(&c); @@ -144,8 +144,8 @@ Result hwopusDecodeInterleaved(HwopusDecoder* decoder, s32 *DecodedSampleCount, struct { u64 magic; u64 result; + s32 DecodedDataSize; s32 DecodedSampleCount; - u32 DecodedDataSize; } *resp; serviceIpcParse(&decoder->s, &r, sizeof(*resp));