diff --git a/components/squeezelite/opus.c b/components/squeezelite/opus.c index 45e3037c..1d4dc6bc 100644 --- a/components/squeezelite/opus.c +++ b/components/squeezelite/opus.c @@ -188,7 +188,12 @@ static decode_state opus_decompress(void) { // work backward to unpack samples (if needed) iptr = (s16_t *) write_buf + count; - optr = (ISAMPLE_T *) write_buf + frames * 2; + IF_DIRECT( + optr = (ISAMPLE_T *) outputbuf->writep + frames * 2; + ) + IF_PROCESS( + optr = (ISAMPLE_T *) write_buf + frames * 2; + ) if (channels == 2) { #if BYTES_PER_FRAME == 4 diff --git a/components/squeezelite/vorbis.c b/components/squeezelite/vorbis.c index 6ade8b84..5c896b0b 100644 --- a/components/squeezelite/vorbis.c +++ b/components/squeezelite/vorbis.c @@ -236,7 +236,12 @@ static decode_state vorbis_decode(void) { // work backward to unpack samples (if needed) iptr = (s16_t *) write_buf + count; - optr = (ISAMPLE_T *) write_buf + frames * 2; + IF_DIRECT( + optr = (ISAMPLE_T *) outputbuf->writep + frames * 2; + ) + IF_PROCESS( + optr = (ISAMPLE_T *) write_buf + frames * 2; + ) if (channels == 2) { #if BYTES_PER_FRAME == 4