From e9095299e91185942fd0c4401739a1a6767fd2f8 Mon Sep 17 00:00:00 2001 From: waker Date: Tue, 17 May 2011 20:34:18 +0200 Subject: fixed bug when DSP plugin changes number or channels --- streamer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'streamer.c') diff --git a/streamer.c b/streamer.c index a5c2c61a..6c866551 100644 --- a/streamer.c +++ b/streamer.c @@ -1728,8 +1728,9 @@ streamer_read_async (char *bytes, int size) { streamer_set_output_format (); } - //printf ("convert to %dbit %s %dch %dHz channelmask=%X\n", output->fmt.bps, output->fmt.is_float ? "float" : "int", output->fmt.channels, output->fmt.samplerate, output->fmt.channelmask); - int n = pcm_convert (&dspfmt, tempbuf, &output->fmt, bytes, nframes * dspsamplesize); + //printf ("convert from %dbit %s %dch %dHz channelmask=%X to %dbit %s %dch %dHz channelmask=%X\n", dspfmt.bps, dspfmt.is_float ? "float" : "int", dspfmt.channels, dspfmt.samplerate, dspfmt.channelmask, output->fmt.bps, output->fmt.is_float ? "float" : "int", output->fmt.channels, output->fmt.samplerate, output->fmt.channelmask); + + int n = pcm_convert (&dspfmt, tempbuf, &output->fmt, bytes, nframes * dspfmt.channels * sizeof (float)); bytesread = n; } -- cgit v1.2.3