changeset 14550:2d90630fbb13

fixed wrong deinterleaving of channels
author nicodvb
date Fri, 21 Jan 2005 07:22:04 +0000
parents acf3241be19b
children 6f44871d210f
files libmpcodecs/ae_toolame.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ae_toolame.c	Thu Jan 20 22:53:37 2005 +0000
+++ b/libmpcodecs/ae_toolame.c	Fri Jan 21 07:22:04 2005 +0000
@@ -119,8 +119,8 @@
 	buffer = (uint16_t *) src;
 	for(i = 0; i < nsamples; i++)
 	{
-	    ctx->left_pcm[i] = buffer[2 * i];
-	    ctx->right_pcm[i] = buffer[2 * i + (ctx->channels - 1)];
+	    ctx->left_pcm[i] = buffer[ctx->channels * i];
+	    ctx->right_pcm[i] = buffer[(ctx->channels * i) + (ctx->channels - 1)];
 	}
 	
 	toolame_encode_buffer(ctx->toolame_ctx, ctx->left_pcm, ctx->right_pcm, nsamples, dest, max_size, &ret_size);