diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-03 14:35:17 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-03 14:35:17 -0500 |
commit | a57983a2176afb4bab3c22efa6a24d39f3c11163 (patch) | |
tree | 56dbcb66e07d997d817e40c1fd8005ee75142e8b /media/libcubeb/src/cubeb-internal.h | |
parent | 6513e41cb75e64384f35470d59ad6a4f88092e82 (diff) | |
parent | 1960d6e08a949ceed50e6a18240d40a7ecee879c (diff) | |
download | UXP-a57983a2176afb4bab3c22efa6a24d39f3c11163.tar UXP-a57983a2176afb4bab3c22efa6a24d39f3c11163.tar.gz UXP-a57983a2176afb4bab3c22efa6a24d39f3c11163.tar.lz UXP-a57983a2176afb4bab3c22efa6a24d39f3c11163.tar.xz UXP-a57983a2176afb4bab3c22efa6a24d39f3c11163.zip |
Merge branch 'master' into mailnews-work
Diffstat (limited to 'media/libcubeb/src/cubeb-internal.h')
-rw-r--r-- | media/libcubeb/src/cubeb-internal.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/media/libcubeb/src/cubeb-internal.h b/media/libcubeb/src/cubeb-internal.h index 312a9ea3a..dfcc186c5 100644 --- a/media/libcubeb/src/cubeb-internal.h +++ b/media/libcubeb/src/cubeb-internal.h @@ -9,7 +9,6 @@ #include "cubeb/cubeb.h" #include "cubeb_log.h" -#include "cubeb_assert.h" #include <stdio.h> #include <string.h> @@ -29,6 +28,9 @@ extern "C" { #endif +/* Crash the caller. */ +void cubeb_crash() CLANG_ANALYZER_NORETURN; + #if defined(__cplusplus) } #endif @@ -42,9 +44,7 @@ struct cubeb_ops { uint32_t * latency_ms); int (* get_preferred_sample_rate)(cubeb * context, uint32_t * rate); int (* enumerate_devices)(cubeb * context, cubeb_device_type type, - cubeb_device_collection * collection); - int (* device_collection_destroy)(cubeb * context, - cubeb_device_collection * collection); + cubeb_device_collection ** collection); void (* destroy)(cubeb * context); int (* stream_init)(cubeb * context, cubeb_stream ** stream, @@ -60,10 +60,10 @@ struct cubeb_ops { void (* stream_destroy)(cubeb_stream * stream); int (* stream_start)(cubeb_stream * stream); int (* stream_stop)(cubeb_stream * stream); - int (* stream_reset_default_device)(cubeb_stream * stream); int (* stream_get_position)(cubeb_stream * stream, uint64_t * position); int (* stream_get_latency)(cubeb_stream * stream, uint32_t * latency); int (* stream_set_volume)(cubeb_stream * stream, float volumes); + int (* stream_set_panning)(cubeb_stream * stream, float panning); int (* stream_get_current_device)(cubeb_stream * stream, cubeb_device ** const device); int (* stream_device_destroy)(cubeb_stream * stream, @@ -76,4 +76,11 @@ struct cubeb_ops { void * user_ptr); }; +#define XASSERT(expr) do { \ + if (!(expr)) { \ + fprintf(stderr, "%s:%d - fatal error: %s\n", __FILE__, __LINE__, #expr); \ + cubeb_crash(); \ + } \ + } while (0) + #endif /* CUBEB_INTERNAL_0eb56756_4e20_4404_a76d_42bf88cd15a5 */ |