Explorar o código

opus & vorbis 32 bits fix

Philippe G %!s(int64=4) %!d(string=hai) anos
pai
achega
46a43efd70
Modificáronse 2 ficheiros con 12 adicións e 2 borrados
  1. 6 1
      components/squeezelite/opus.c
  2. 6 1
      components/squeezelite/vorbis.c

+ 6 - 1
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

+ 6 - 1
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