summaryrefslogtreecommitdiffstats
path: root/tests/check/elements/audiocheblimit.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/check/elements/audiocheblimit.c')
-rw-r--r--tests/check/elements/audiocheblimit.c340
1 files changed, 161 insertions, 179 deletions
diff --git a/tests/check/elements/audiocheblimit.c b/tests/check/elements/audiocheblimit.c
index bf7ad09e..70645b98 100644
--- a/tests/check/elements/audiocheblimit.c
+++ b/tests/check/elements/audiocheblimit.c
@@ -2,7 +2,7 @@
*
* Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
*
- * audiochebyshevfreqlimit.c: Unit test for the audiochebyshevfreqlimit element
+ * audiocheblimit.c: Unit test for the audiocheblimit element
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -63,26 +63,24 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
);
GstElement *
-setup_audiochebyshevfreqlimit ()
+setup_audiocheblimit ()
{
- GstElement *audiochebyshevfreqlimit;
-
- GST_DEBUG ("setup_audiochebyshevfreqlimit");
- audiochebyshevfreqlimit = gst_check_setup_element ("audiochebyshevfreqlimit");
- mysrcpad =
- gst_check_setup_src_pad (audiochebyshevfreqlimit, &srctemplate, NULL);
- mysinkpad =
- gst_check_setup_sink_pad (audiochebyshevfreqlimit, &sinktemplate, NULL);
+ GstElement *audiocheblimit;
+
+ GST_DEBUG ("setup_audiocheblimit");
+ audiocheblimit = gst_check_setup_element ("audiocheblimit");
+ mysrcpad = gst_check_setup_src_pad (audiocheblimit, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (audiocheblimit, &sinktemplate, NULL);
gst_pad_set_active (mysrcpad, TRUE);
gst_pad_set_active (mysinkpad, TRUE);
- return audiochebyshevfreqlimit;
+ return audiocheblimit;
}
void
-cleanup_audiochebyshevfreqlimit (GstElement * audiochebyshevfreqlimit)
+cleanup_audiocheblimit (GstElement * audiocheblimit)
{
- GST_DEBUG ("cleanup_audiochebyshevfreqlimit");
+ GST_DEBUG ("cleanup_audiocheblimit");
g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
g_list_free (buffers);
@@ -90,9 +88,9 @@ cleanup_audiochebyshevfreqlimit (GstElement * audiochebyshevfreqlimit)
gst_pad_set_active (mysrcpad, FALSE);
gst_pad_set_active (mysinkpad, FALSE);
- gst_check_teardown_src_pad (audiochebyshevfreqlimit);
- gst_check_teardown_sink_pad (audiochebyshevfreqlimit);
- gst_check_teardown_element (audiochebyshevfreqlimit);
+ gst_check_teardown_src_pad (audiocheblimit);
+ gst_check_teardown_sink_pad (audiocheblimit);
+ gst_check_teardown_element (audiocheblimit);
}
/* Test if data containing only one frequency component
@@ -100,25 +98,24 @@ cleanup_audiochebyshevfreqlimit (GstElement * audiochebyshevfreqlimit)
* at rate/4 */
GST_START_TEST (test_type1_32_lp_0hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gfloat *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to lowpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 0, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 0.25, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
in = (gfloat *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i++)
@@ -144,7 +141,7 @@ GST_START_TEST (test_type1_32_lp_0hz)
fail_unless (rms >= 0.9);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -154,25 +151,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type1_32_lp_22050hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gfloat *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to lowpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 0, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 0.25, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
in = (gfloat *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i += 2) {
@@ -200,7 +196,7 @@ GST_START_TEST (test_type1_32_lp_22050hz)
fail_unless (rms <= 0.1);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -210,25 +206,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type1_32_hp_0hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gfloat *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to highpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 0.25, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
in = (gfloat *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i++)
@@ -254,7 +249,7 @@ GST_START_TEST (test_type1_32_hp_0hz)
fail_unless (rms <= 0.1);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -264,25 +259,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type1_32_hp_22050hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gfloat *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to highpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 0.25, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
in = (gfloat *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i += 2) {
@@ -310,7 +304,7 @@ GST_START_TEST (test_type1_32_hp_22050hz)
fail_unless (rms >= 0.9);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -320,25 +314,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type1_64_lp_0hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gdouble *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to lowpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 0, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 0.25, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
in = (gdouble *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i++)
@@ -364,7 +357,7 @@ GST_START_TEST (test_type1_64_lp_0hz)
fail_unless (rms >= 0.9);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -374,25 +367,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type1_64_lp_22050hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gdouble *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to lowpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 0, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 0.25, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
in = (gdouble *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i += 2) {
@@ -420,7 +412,7 @@ GST_START_TEST (test_type1_64_lp_22050hz)
fail_unless (rms <= 0.1);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -430,25 +422,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type1_64_hp_0hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gdouble *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to highpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 0.25, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
in = (gdouble *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i++)
@@ -474,7 +465,7 @@ GST_START_TEST (test_type1_64_hp_0hz)
fail_unless (rms <= 0.1);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -484,25 +475,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type1_64_hp_22050hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gdouble *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to highpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 0.25, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
in = (gdouble *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i += 2) {
@@ -530,7 +520,7 @@ GST_START_TEST (test_type1_64_hp_22050hz)
fail_unless (rms >= 0.9);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -540,25 +530,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type2_32_lp_0hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gfloat *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to lowpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 0, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 2, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 40.0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
in = (gfloat *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i++)
@@ -584,7 +573,7 @@ GST_START_TEST (test_type2_32_lp_0hz)
fail_unless (rms >= 0.9);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -594,25 +583,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type2_32_lp_22050hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gfloat *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to lowpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 0, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 2, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 40.0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
in = (gfloat *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i += 2) {
@@ -640,7 +628,7 @@ GST_START_TEST (test_type2_32_lp_22050hz)
fail_unless (rms <= 0.1);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -650,25 +638,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type2_32_hp_0hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gfloat *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to highpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 2, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 40.0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
in = (gfloat *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i++)
@@ -694,7 +681,7 @@ GST_START_TEST (test_type2_32_hp_0hz)
fail_unless (rms <= 0.1);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -704,25 +691,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type2_32_hp_22050hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gfloat *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to highpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 2, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 40.0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
in = (gfloat *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i += 2) {
@@ -750,7 +736,7 @@ GST_START_TEST (test_type2_32_hp_22050hz)
fail_unless (rms >= 0.9);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -760,25 +746,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type2_64_lp_0hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gdouble *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to lowpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 0, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 2, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 40.0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
in = (gdouble *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i++)
@@ -804,7 +789,7 @@ GST_START_TEST (test_type2_64_lp_0hz)
fail_unless (rms >= 0.9);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -814,25 +799,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type2_64_lp_22050hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gdouble *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to lowpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 0, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 2, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 40.0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
in = (gdouble *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i += 2) {
@@ -860,7 +844,7 @@ GST_START_TEST (test_type2_64_lp_22050hz)
fail_unless (rms <= 0.1);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -870,25 +854,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type2_64_hp_0hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gdouble *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to highpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 2, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 40.0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
in = (gdouble *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i++)
@@ -914,7 +897,7 @@ GST_START_TEST (test_type2_64_hp_0hz)
fail_unless (rms <= 0.1);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
@@ -924,25 +907,24 @@ GST_END_TEST;
* at rate/4 */
GST_START_TEST (test_type2_64_hp_22050hz)
{
- GstElement *audiochebyshevfreqlimit;
+ GstElement *audiocheblimit;
GstBuffer *inbuffer, *outbuffer;
GstCaps *caps;
gdouble *in, *res, rms;
gint i;
- audiochebyshevfreqlimit = setup_audiochebyshevfreqlimit ();
+ audiocheblimit = setup_audiocheblimit ();
/* Set to highpass */
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "mode", 1, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "poles", 8, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "type", 2, NULL);
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "ripple", 40.0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
- fail_unless (gst_element_set_state (audiochebyshevfreqlimit,
+ fail_unless (gst_element_set_state (audiocheblimit,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- g_object_set (G_OBJECT (audiochebyshevfreqlimit), "cutoff", 44100 / 4.0,
- NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
in = (gdouble *) GST_BUFFER_DATA (inbuffer);
for (i = 0; i < 128; i += 2) {
@@ -970,16 +952,16 @@ GST_START_TEST (test_type2_64_hp_22050hz)
fail_unless (rms >= 0.9);
/* cleanup */
- cleanup_audiochebyshevfreqlimit (audiochebyshevfreqlimit);
+ cleanup_audiocheblimit (audiocheblimit);
}
GST_END_TEST;
Suite *
-audiochebyshevfreqlimit_suite (void)
+audiocheblimit_suite (void)
{
- Suite *s = suite_create ("audiochebyshevfreqlimit");
+ Suite *s = suite_create ("audiocheblimit");
TCase *tc_chain = tcase_create ("general");
suite_add_tcase (s, tc_chain);
@@ -1007,7 +989,7 @@ main (int argc, char **argv)
{
int nf;
- Suite *s = audiochebyshevfreqlimit_suite ();
+ Suite *s = audiocheblimit_suite ();
SRunner *sr = srunner_create (s);
gst_check_init (&argc, &argv);