aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorDamien Zammit <[email protected]>2017-02-21 16:09:05 +1100
committerMatthew Gregan <[email protected]>2017-03-13 11:00:12 +1300
commit4c39aae8d31334dc46d3b69d9695eed790fac38b (patch)
tree711b285becb19f69053c82ed64a7deb6ad320570 /include
parent7b082450d2b57a4f2c541cb69558ae28682163f2 (diff)
downloadcubeb-4c39aae8d31334dc46d3b69d9695eed790fac38b.tar.gz
cubeb-4c39aae8d31334dc46d3b69d9695eed790fac38b.zip
cubeb-api: Give cubeb_init a third param, backend name
This allows forcing of a particular backend by name, *if* it was compiled in, otherwise default list is tried in default order as before. Tests updated to reflect new api. (Gecko change required) Using JACK backend: 100% tests passed, 0 tests failed out of 13 Total Test time (real) = 183.75 sec Signed-off-by: Damien Zammit <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/cubeb/cubeb.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/cubeb/cubeb.h b/include/cubeb/cubeb.h
index b435d16..1421878 100644
--- a/include/cubeb/cubeb.h
+++ b/include/cubeb/cubeb.h
@@ -414,10 +414,16 @@ typedef void (* cubeb_log_callback)(char const * fmt, ...);
context will be returned.
@param context_name A name for the context. Depending on the platform this
can appear in different locations.
+ @param backend_name The name of the cubeb backend user desires to select.
+ Accepted values self-documented in cubeb.c: init_oneshot
+ If NULL, a default ordering is used for backend choice.
+ A valid choice overrides all other possible backends,
+ so long as the backend was included at compile time.
@retval CUBEB_OK in case of success.
@retval CUBEB_ERROR in case of error, for example because the host
has no audio hardware. */
-CUBEB_EXPORT int cubeb_init(cubeb ** context, char const * context_name);
+CUBEB_EXPORT int cubeb_init(cubeb ** context, char const * context_name,
+ char const * backend_name);
/** Get a read-only string identifying this context's current backend.
@param context A pointer to the cubeb context.