summaryrefslogtreecommitdiffstats
path: root/media/libcubeb/src/cubeb-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/libcubeb/src/cubeb-internal.h')
-rw-r--r--media/libcubeb/src/cubeb-internal.h17
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 */