From 35beabb8d76aff0810c2744f35d2c93408445827 Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 21 Sep 2020 18:01:46 +1000 Subject: [PATCH] Fix a bug in ma_decoder_seek_to_pcm_frames(). This bug is that the function is never returning MA_SUCCESS even when successful. --- miniaudio.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/miniaudio.h b/miniaudio.h index 936e3698..6d691dbf 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -45903,6 +45903,8 @@ MA_API ma_result ma_decoder_seek_to_pcm_frame(ma_decoder* pDecoder, ma_uint64 fr if (result == MA_SUCCESS) { pDecoder->readPointerInPCMFrames = frameIndex; } + + return result; } /* Should never get here, but if we do it means onSeekToPCMFrame was not set by the backend. */ @@ -62551,6 +62553,7 @@ REVISION HISTORY ================ v0.10.19 - TBD - WASAPI: Return an error when exclusive mode is requested, but the native format is not supported by miniaudio. + - Fix a bug where ma_decoder_seek_to_pcm_frames() never returns MA_SUCCESS even though it was successful. - Store the sample rate in the `ma_lpf` and `ma_hpf` structures. v0.10.18 - 2020-08-30