]> git.sesse.net Git - nageru/blobdiff - resampling_queue.cpp
Make it possible to override the level compressor with the gain staging knob.
[nageru] / resampling_queue.cpp
index 80d12297ce4e90c74d183eae747de34ccdb98fa6..109c42060307c3b0450b7799c814e4168477b268 100644 (file)
@@ -1,5 +1,6 @@
-// Parts of the code is adapted from Adriaensen's project Zita-ajbridge,
-// although it has been heavily reworked for this use case. Original copyright follows:
+// Parts of the code is adapted from Adriaensen's project Zita-ajbridge
+// (as of November 2015), although it has been heavily reworked for this use
+// case. Original copyright follows:
 //
 //  Copyright (C) 2012-2015 Fons Adriaensen <fons@linuxaudio.org>
 //    
@@ -118,7 +119,7 @@ bool ResamplingQueue::get_output_samples(double pts, float *samples, ssize_t num
                        // or we're dropping a lot of data.
                        fprintf(stderr, "PANIC: Out of input samples to resample, still need %d output samples!\n",
                                int(vresampler.out_count));
-                       memset(vresampler.out_data, 0, vresampler.out_count * sizeof(float));
+                       memset(vresampler.out_data, 0, vresampler.out_count * 2 * sizeof(float));
                        return false;
                }