From 1960d6e08a949ceed50e6a18240d40a7ecee879c Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sun, 3 Nov 2019 14:14:26 -0500 Subject: Revert "Issue #1267 - Part 1: Update libcubeb to a1200c34." This reverts commit d162ecbaffe845c9707da5d2f6cab11f343ef00e. --- media/libcubeb/src/cubeb-internal.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'media/libcubeb/src/cubeb-internal.h') 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 #include @@ -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 */ -- cgit v1.2.3