]> git.sesse.net Git - nageru/blobdiff - nageru/resampling_queue.cpp
Various fixes for 32-bit platforms.
[nageru] / nageru / resampling_queue.cpp
index ef7b73511ff596f7e93894fd703038ad370c8841..711c1c5239f44aad7df9000711556bc2ff39c2d6 100644 (file)
@@ -115,7 +115,7 @@ bool ResamplingQueue::get_output_samples(steady_clock::time_point ts, float *sam
                        // so that we don't need a long period to stabilize at the beginning.
                        if (err < 0.0) {
                                int delay_samples_to_add = lrintf(-err);
-                               for (ssize_t i = 0; i < delay_samples_to_add * num_channels; ++i) {
+                               for (ssize_t i = 0; i < delay_samples_to_add * int(num_channels); ++i) {
                                        buffer.push_front(0.0f);
                                }
                                total_consumed_samples -= delay_samples_to_add;  // Equivalent to increasing input_samples_received on a0 and a1.
@@ -143,7 +143,7 @@ bool ResamplingQueue::get_output_samples(steady_clock::time_point ts, float *sam
                // (we start ResamplingQueues also when we e.g. switch sound sources),
                // but in general, a little bit of increased timing jitter is acceptable
                // right after a setup change like this.
-               double loop_bandwidth_hz = (total_consumed_samples < 4 * freq_in) ? 0.2 : 0.02;
+               double loop_bandwidth_hz = (total_consumed_samples < 4 * int(freq_in)) ? 0.2 : 0.02;
 
                // Set filters. The first filter much wider than the first one (20x as wide).
                double w = (2.0 * M_PI) * loop_bandwidth_hz * num_samples / freq_out;