diff options
author | Dan Glastonbury <[email protected]> | 2018-02-13 12:30:46 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2018-02-13 12:30:46 +1000 |
commit | 1d53c3a3779cbeb860b16aa38cc7f51e196b9745 (patch) | |
tree | e52b57a20e8d930c8bfb420ddb12af37efc94344 /include | |
parent | 475d97f64567b292761bd9dddaecbd54749b3aa3 (diff) | |
download | cubeb-1d53c3a3779cbeb860b16aa38cc7f51e196b9745.tar.gz cubeb-1d53c3a3779cbeb860b16aa38cc7f51e196b9745.zip |
Provide access to cubeb_stream's user ptr. (#407)
Provide access to cubeb_stream's user ptr.
cubeb_stream in every backend has a copy of the user data ptr passed
in during `stream_init` but there is no way to access the
value. (Besides from `data_callback`/`state_callback`).
Add `cubeb_stream_user_ptr()` to retrieve the stored value.
Diffstat (limited to 'include')
-rw-r--r-- | include/cubeb/cubeb.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cubeb/cubeb.h b/include/cubeb/cubeb.h index 64f3a8d..b7dc862 100644 --- a/include/cubeb/cubeb.h +++ b/include/cubeb/cubeb.h @@ -599,6 +599,11 @@ CUBEB_EXPORT int cubeb_stream_device_destroy(cubeb_stream * stream, CUBEB_EXPORT int cubeb_stream_register_device_changed_callback(cubeb_stream * stream, cubeb_device_changed_callback device_changed_callback); +/** Return the user data pointer registered with the stream with cubeb_stream_init. + @param stream the stream for which to retrieve user data pointer. + @retval user data pointer */ +CUBEB_EXPORT void * cubeb_stream_user_ptr(cubeb_stream * stream); + /** Returns enumerated devices. @param context @param devtype device type to include |