aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_utils.h
diff options
context:
space:
mode:
authorDan Glastonbury <[email protected]>2017-05-22 18:55:15 +1000
committerAlex Chronopoulos <[email protected]>2017-05-22 11:55:15 +0300
commit96cdb173f86dfc86cbd21d097b24ec1e256d69fc (patch)
treed1e37936ba60cb43266b16430d2c0fa044bd1efe /src/cubeb_utils.h
parent91f801d661d6fcad9d01ea5ba3bbf5d59fa9ac4c (diff)
downloadcubeb-96cdb173f86dfc86cbd21d097b24ec1e256d69fc.tar.gz
cubeb-96cdb173f86dfc86cbd21d097b24ec1e256d69fc.zip
Push destroy fns to backend (#302)
* Make cubeb_device_info_destroy private. * Move implementation of cubeb_device_collection_destroy to cubeb_utils. * Move cubeb_device_collection_destroy implementation into backend. Push the responsiblity for destroying device collections to the backends so they can make independent choices on how to handle allocation. * Unstage space changes
Diffstat (limited to 'src/cubeb_utils.h')
-rw-r--r--src/cubeb_utils.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/cubeb_utils.h b/src/cubeb_utils.h
index b889cc8..00011ce 100644
--- a/src/cubeb_utils.h
+++ b/src/cubeb_utils.h
@@ -8,6 +8,10 @@
#if !defined(CUBEB_UTILS)
#define CUBEB_UTILS
+#include "cubeb/cubeb.h"
+
+#ifdef __cplusplus
+
#include <stdint.h>
#include <string.h>
#include <assert.h>
@@ -330,5 +334,19 @@ private:
};
using auto_lock = std::lock_guard<owned_critical_section>;
+#endif // __cplusplus
+
+// C language helpers
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int cubeb_utils_default_device_collection_destroy(cubeb * context,
+ cubeb_device_collection * collection);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* CUBEB_UTILS */