Index: /libmpc/trunk/libmpcdec/internal.h
===================================================================
--- /libmpc/trunk/libmpcdec/internal.h	(revision 359)
+++ /libmpc/trunk/libmpcdec/internal.h	(revision 360)
@@ -62,5 +62,5 @@
 	unsigned int count; /// unread bits in current byte
 };
-	
+
 #define MAX_FRAME_SIZE 4352
 #define DEMUX_BUFFER_SIZE (65536 - MAX_FRAME_SIZE) // need some space as sand box
@@ -87,5 +87,5 @@
 mpc_uint32_t mpc_random_int(mpc_decoder *d); // in synth_filter.c
 void mpc_decoder_init_quant(mpc_decoder *d, double scale_factor);
-void mpc_decoder_synthese_filter_float(mpc_decoder *d, MPC_SAMPLE_FORMAT* OutData);
+void mpc_decoder_synthese_filter_float(mpc_decoder *d, MPC_SAMPLE_FORMAT* OutData, mpc_int_t channels);
 
 #ifdef __cplusplus
Index: /libmpc/trunk/libmpcdec/mpc_decoder.c
===================================================================
--- /libmpc/trunk/libmpcdec/mpc_decoder.c	(revision 359)
+++ /libmpc/trunk/libmpcdec/mpc_decoder.c	(revision 360)
@@ -163,5 +163,5 @@
 	if (d->samples_to_skip < MPC_FRAME_LENGTH + MPC_DECODER_SYNTH_DELAY) {
 		mpc_decoder_requantisierung(d);
-		mpc_decoder_synthese_filter_float(d, i->buffer);
+		mpc_decoder_synthese_filter_float(d, i->buffer, d->channels);
 	}
 
Index: /libmpc/trunk/libmpcdec/synth_filter.c
===================================================================
--- /libmpc/trunk/libmpcdec/synth_filter.c	(revision 359)
+++ /libmpc/trunk/libmpcdec/synth_filter.c	(revision 360)
@@ -330,5 +330,5 @@
 
 static void
-mpc_synthese_filter_float_internal(MPC_SAMPLE_FORMAT* p_out, MPC_SAMPLE_FORMAT* pV, const MPC_SAMPLE_FORMAT* pY)
+mpc_synthese_filter_float_internal(MPC_SAMPLE_FORMAT* p_out, MPC_SAMPLE_FORMAT* pV, const MPC_SAMPLE_FORMAT* pY, mpc_int_t channels)
 {
     mpc_uint32_t n;
@@ -348,21 +348,23 @@
                    + MPC_MULTIPLY_FRACT(pV[768], pD[12]) + MPC_MULTIPLY_FRACT(pV[864], pD[13]) + MPC_MULTIPLY_FRACT(pV[896], pD[14]) + MPC_MULTIPLY_FRACT(pV[992], pD[15])
                    , 2);
-            pData += 2;
+            pData += channels;
         }
         pV    -= 32; //bleh
-        p_out += 64;
+        p_out += 32 * channels;
     }
 }
 
 void
-mpc_decoder_synthese_filter_float(mpc_decoder* p_dec, MPC_SAMPLE_FORMAT* p_out)
+mpc_decoder_synthese_filter_float(mpc_decoder* p_dec, MPC_SAMPLE_FORMAT* p_out, mpc_int_t channels)
 {
     /********* left channel ********/
     memmove(&p_dec->V_L[MPC_V_MEM], p_dec->V_L, 960 * sizeof *p_dec->V_L);
-    mpc_synthese_filter_float_internal(p_out, &p_dec->V_L[MPC_V_MEM], p_dec->Y_L[0]);
+	mpc_synthese_filter_float_internal(p_out, &p_dec->V_L[MPC_V_MEM], p_dec->Y_L[0], channels);
 
     /******** right channel ********/
-    memmove(&p_dec->V_R[MPC_V_MEM], p_dec->V_R, 960 * sizeof *p_dec->V_R);
-    mpc_synthese_filter_float_internal(p_out + 1, &p_dec->V_R[MPC_V_MEM], p_dec->Y_R[0]);
+	if (channels > 1) {
+		memmove(&p_dec->V_R[MPC_V_MEM], p_dec->V_R, 960 * sizeof *p_dec->V_R);
+		mpc_synthese_filter_float_internal(p_out + 1, &p_dec->V_R[MPC_V_MEM], p_dec->Y_R[0], channels);
+	}
 }
 
Index: /libmpc/trunk/mpcdec/mpcdec.c
===================================================================
--- /libmpc/trunk/mpcdec/mpcdec.c	(revision 359)
+++ /libmpc/trunk/mpcdec/mpcdec.c	(revision 360)
@@ -47,5 +47,5 @@
 #define MPCDEC_MAJOR 0
 #define MPCDEC_MINOR 9
-#define MPCDEC_BUILD 1
+#define MPCDEC_BUILD 2
 
 #define _cat(a,b,c) #a"."#b"."#c
@@ -170,5 +170,5 @@
 			wavo_fc.m_user_data = fopen(argv[optind + 1], "wb");
         if(!wavo_fc.m_user_data) return !MPC_STATUS_OK;
-        err = waveformat_output_open(&wav_output, wavo_fc, si.channels, 16, 0, si.sample_freq, (t_wav_uint32) si.samples * 2);
+        err = waveformat_output_open(&wav_output, wavo_fc, si.channels, 16, 0, si.sample_freq, (t_wav_uint32) si.samples * si.channels);
         if(!err) return !MPC_STATUS_OK;
     }
@@ -200,7 +200,7 @@
 				tmp_buff[i] = tmp;
 			}
-			if(waveformat_output_process_int16(&wav_output, tmp_buff, frame.samples*2) < 0)
+			if(waveformat_output_process_int16(&wav_output, tmp_buff, frame.samples * si.channels) < 0)
 #else
-            if(waveformat_output_process_float32(&wav_output, sample_buffer, frame.samples*2) < 0)
+			if(waveformat_output_process_float32(&wav_output, sample_buffer, frame.samples * si.channels) < 0)
 #endif
                 break;
