aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorChun-Min Chang <[email protected]>2017-02-07 18:45:49 +0800
committerPaul Adenot <[email protected]>2017-02-07 11:45:49 +0100
commitf4edfb8eea920887713325e44773f3a2d959860c (patch)
treef1c14f658ba472c8e377993f628f0c17bd917837 /test
parentafad5aaee8fccd355d9222331230d852537e1618 (diff)
downloadcubeb-f4edfb8eea920887713325e44773f3a2d959860c.tar.gz
cubeb-f4edfb8eea920887713325e44773f3a2d959860c.zip
Multiple channel support on OS X (#212)
* fix typo * Add cubeb_channel_map_to_layout * Implement audiounit_get_preferred_channel_layout * Implement audiounit_layout_init * Create auto_channel_layout to replace raw operation of AudioChannelLayout * Apply cubeb_channel_map_to_layout in cubeb_pulse.c * Use enum instead of bool to indicate input or output * Show input/output, preferred or not in error message for channel layout * Replace Boolean writable by nullptr * Null the raw pointer(layout) after freeing it * Use fieldOffset to calculate size of AudioChannelLayout * Return CUBEB_ERROR when preferred layout is non-SMPTE format * Check layout is undefined when cubeb_get_preferred_channel_layout returns ERROR
Diffstat (limited to 'test')
-rw-r--r--test/test_latency.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_latency.cpp b/test/test_latency.cpp
index 0a0e4c2..94c9e5c 100644
--- a/test/test_latency.cpp
+++ b/test/test_latency.cpp
@@ -27,7 +27,8 @@ TEST(cubeb, latency)
}
r = cubeb_get_preferred_channel_layout(ctx, &layout);
- ASSERT_TRUE(r == CUBEB_OK || r == CUBEB_ERROR_NOT_SUPPORTED);
+ ASSERT_TRUE(r == CUBEB_OK || r == CUBEB_ERROR_NOT_SUPPORTED ||
+ (r == CUBEB_ERROR && layout == CUBEB_LAYOUT_UNDEFINED));
cubeb_stream_params params = {
CUBEB_SAMPLE_FLOAT32NE,