aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_latency.cpp
diff options
context:
space:
mode:
authorDan Glastonbury <[email protected]>2017-05-23 12:35:29 +1000
committerMatthew Gregan <[email protected]>2017-05-23 15:32:12 +1200
commitc9641ca143e3263779137f08c58ef43ab0a7c75d (patch)
tree3f488931127f99ad56e0c0c8c0839821a2d7af97 /test/test_latency.cpp
parent0c74372fd5e24d3ed0316bbb656a5f5995fc25b0 (diff)
downloadcubeb-c9641ca143e3263779137f08c58ef43ab0a7c75d.tar.gz
cubeb-c9641ca143e3263779137f08c58ef43ab0a7c75d.zip
Add backend specification support to common.h
Set CUBEB_BACKEND env var to the name of valid backend supported by the current platform to prefer that backend over the default choice. If CUBEB_BACKEND is not valid, backend selection falls back to the standard behaviour. A warning is printed to stderr if the chosen backend id doesn't match the requested one.
Diffstat (limited to 'test/test_latency.cpp')
-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 445f511..7ef2a9a 100644
--- a/test/test_latency.cpp
+++ b/test/test_latency.cpp
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <memory>
#include "cubeb/cubeb.h"
+#include "common.h"
TEST(cubeb, latency)
{
@@ -12,7 +13,7 @@ TEST(cubeb, latency)
uint32_t latency_frames;
cubeb_channel_layout layout;
- r = cubeb_init(&ctx, "Cubeb audio test", NULL);
+ r = common_init(&ctx, "Cubeb audio test");
ASSERT_EQ(r, CUBEB_OK);
std::unique_ptr<cubeb, decltype(&cubeb_destroy)>