ref: ebe189dc51aee17a1f6517ff3013546ac06120df
parent: 5cbd21e1d260f52f26a6a4b3cbabf2aa4325dc65
author: Jean-Marc Valin <[email protected]>
date: Sat Apr 29 20:44:48 EDT 2017
oops
--- a/src/opusenc.c
+++ b/src/opusenc.c
@@ -305,7 +305,7 @@
enc->buffer[channels*enc->buffer_end+i] = pcm[i];
}
enc->buffer_end += curr;
- pcm += curr;
+ pcm += curr*channels;
samples_per_channel -= curr;
encode_buffer(enc);
} while (samples_per_channel > 0);
@@ -326,7 +326,7 @@
enc->buffer[channels*enc->buffer_end+i] = (1.f/32768)*pcm[i];
}
enc->buffer_end += curr;
- pcm += curr;
+ pcm += curr*channels;
samples_per_channel -= curr;
encode_buffer(enc);
} while (samples_per_channel > 0);