aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorPaul Adenot <[email protected]>2019-08-21 17:34:40 +0200
committerMatthew Gregan <[email protected]>2019-08-22 10:11:25 +1200
commit8c3e32bd24933f82220b66c88c845c4b2bdf28e7 (patch)
tree9250ea5fbb481108fd765c8d611f4317cd104ce0 /test
parent323ced80197a2b3441d28bb12a4e53d4c30e0221 (diff)
downloadcubeb-8c3e32bd24933f82220b66c88c845c4b2bdf28e7.tar.gz
cubeb-8c3e32bd24933f82220b66c88c845c4b2bdf28e7.zip
Remove panning API from cubeb
This is best done by the host application, and had very little implementation anyways.
Diffstat (limited to 'test')
-rw-r--r--test/test_audio.cpp22
-rw-r--r--test/test_sanity.cpp7
2 files changed, 7 insertions, 22 deletions
diff --git a/test/test_audio.cpp b/test/test_audio.cpp
index 98ba197..ea1b999 100644
--- a/test/test_audio.cpp
+++ b/test/test_audio.cpp
@@ -148,7 +148,7 @@ int run_test(int num_channels, int sampling_rate, int is_float)
return r;
}
-int run_panning_volume_test(int is_float)
+int run_volume_test(int is_float)
{
int r = CUBEB_OK;
@@ -203,29 +203,17 @@ int run_panning_volume_test(int is_float)
delay(100);
}
- fprintf(stderr, "Testing: panning\n");
- for(int i=-4;i <= 4; ++i)
- {
- fprintf(stderr, "Panning: %.2f\n", i/4.0f);
-
- cubeb_stream_set_panning(stream, i/4.0f);
- cubeb_stream_start(stream);
- delay(400);
- cubeb_stream_stop(stream);
- delay(100);
- }
-
return r;
}
-TEST(cubeb, run_panning_volume_test_short)
+TEST(cubeb, run_volume_test_short)
{
- ASSERT_EQ(run_panning_volume_test(0), CUBEB_OK);
+ ASSERT_EQ(run_volume_test(0), CUBEB_OK);
}
-TEST(cubeb, run_panning_volume_test_float)
+TEST(cubeb, run_volume_test_float)
{
- ASSERT_EQ(run_panning_volume_test(1), CUBEB_OK);
+ ASSERT_EQ(run_volume_test(1), CUBEB_OK);
}
TEST(cubeb, run_channel_rate_test)
diff --git a/test/test_sanity.cpp b/test/test_sanity.cpp
index caebe1b..56099d2 100644
--- a/test/test_sanity.cpp
+++ b/test/test_sanity.cpp
@@ -215,7 +215,7 @@ TEST(cubeb, configure_stream)
params.format = STREAM_FORMAT;
params.rate = STREAM_RATE;
- params.channels = 2; // panning
+ params.channels = 2;
params.layout = CUBEB_LAYOUT_STEREO;
params.prefs = CUBEB_STREAM_PREF_NONE;
@@ -227,9 +227,6 @@ TEST(cubeb, configure_stream)
r = cubeb_stream_set_volume(stream, 1.0f);
ASSERT_TRUE(r == 0 || r == CUBEB_ERROR_NOT_SUPPORTED);
- r = cubeb_stream_set_panning(stream, 0.0f);
- ASSERT_TRUE(r == 0 || r == CUBEB_ERROR_NOT_SUPPORTED);
-
cubeb_stream_destroy(stream);
cubeb_destroy(ctx);
}
@@ -247,7 +244,7 @@ TEST(cubeb, configure_stream_undefined_layout)
params.format = STREAM_FORMAT;
params.rate = STREAM_RATE;
- params.channels = 2; // panning
+ params.channels = 2;
params.layout = CUBEB_LAYOUT_UNDEFINED;
params.prefs = CUBEB_STREAM_PREF_NONE;