# HG changeset patch # User nicodvb # Date 1106292124 0 # Node ID 2d90630fbb1341d8b96e851e5e61cdb68e821163 # Parent acf3241be19bddd73450d151ad1fda3f1e1f77a3 fixed wrong deinterleaving of channels diff -r acf3241be19b -r 2d90630fbb13 libmpcodecs/ae_toolame.c --- 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);