summaryrefslogtreecommitdiff
path: root/streamer.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-05-17 20:34:18 +0200
committerGravatar waker <wakeroid@gmail.com>2011-05-17 20:34:18 +0200
commite9095299e91185942fd0c4401739a1a6767fd2f8 (patch)
treefb25fc9bb9a9f925e8d379eacc0a250a3dc273cc /streamer.c
parentaf3860c0a37d482c2b3a963c6b205bb49e8ee08b (diff)
fixed bug when DSP plugin changes number or channels
Diffstat (limited to 'streamer.c')
-rw-r--r--streamer.c5
1 files changed, 3 insertions, 2 deletions
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;
}