tests: fix a thinko in the wavenc example
authorAntonio Ospite <ao2@ao2.it>
Fri, 29 Aug 2014 13:40:23 +0000 (15:40 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 12 Jan 2016 22:20:33 +0000 (22:20 +0000)
The code is supposed to follow somehow what the comment above says, that
is to have one channel with a wave of freq 440 and the other channel
with a wave of freq 880, but an off by one error results in frequencies
of 0 and 440.

https://bugzilla.gnome.org/show_bug.cgi?id=735673

tests/check/pipelines/wavenc.c

index ee30c18..1402ea2 100644 (file)
@@ -110,8 +110,8 @@ make_n_channel_wav (const gint channels, const GValueArray * arr)
   for (i = 0; i < channels; i++) {
     audiotestsrc[i] = gst_element_factory_make ("audiotestsrc", NULL);
     fail_unless (audiotestsrc[i] != NULL);
-    g_object_set (G_OBJECT (audiotestsrc[i]), "wave", 0, "freq", 440.0 * i,
-        "num-buffers", 100, NULL);
+    g_object_set (G_OBJECT (audiotestsrc[i]), "wave", 0, "freq",
+        440.0 * (i + 1), "num-buffers", 100, NULL);
     gst_bin_add (GST_BIN (pipeline), audiotestsrc[i]);
     fail_unless (gst_element_link (audiotestsrc[i], interleave));
   }