From 5baeb1e808f8811d2538e92a1361c8f831d5c504 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 22 Apr 2023 11:42:36 +0300 Subject: [PATCH] audiotestsrc: Initialize all samples in wave=ticks mode Previously samples were only initialized in 2 out of 3 cases. Probably fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/337 Part-of: --- subprojects/gst-plugins-base/gst/audiotestsrc/gstaudiotestsrc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-base/gst/audiotestsrc/gstaudiotestsrc.c b/subprojects/gst-plugins-base/gst/audiotestsrc/gstaudiotestsrc.c index a15fe5b..27707b5 100644 --- a/subprojects/gst-plugins-base/gst/audiotestsrc/gstaudiotestsrc.c +++ b/subprojects/gst-plugins-base/gst/audiotestsrc/gstaudiotestsrc.c @@ -953,6 +953,10 @@ gst_audio_test_src_create_tick_##type (GstAudioTestSrc * src, g##type * samples) src->accumulator = 0; \ src->tick_counter++; \ volscale = calc_scaled_tick_volume (src, scale); \ + for (c = 0; c < channels; ++c) { \ + *ptr = 0; \ + ptr += channel_step; \ + } \ } else if (samplemod < num_nonzero_samples) { \ gdouble ramp; \ if (num_ramp_samples > 0) { \ -- 2.7.4