aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_jack.cpp
diff options
context:
space:
mode:
authorDan Glastonbury <[email protected]>2018-02-13 12:30:46 +1000
committerGitHub <[email protected]>2018-02-13 12:30:46 +1000
commit1d53c3a3779cbeb860b16aa38cc7f51e196b9745 (patch)
treee52b57a20e8d930c8bfb420ddb12af37efc94344 /src/cubeb_jack.cpp
parent475d97f64567b292761bd9dddaecbd54749b3aa3 (diff)
downloadcubeb-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 'src/cubeb_jack.cpp')
-rw-r--r--src/cubeb_jack.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cubeb_jack.cpp b/src/cubeb_jack.cpp
index f1a2d78..5f4128d 100644
--- a/src/cubeb_jack.cpp
+++ b/src/cubeb_jack.cpp
@@ -139,7 +139,10 @@ static struct cubeb_ops const cbjack_ops = {
};
struct cubeb_stream {
+ /* Note: Must match cubeb_stream layout in cubeb.c. */
cubeb * context;
+ void * user_ptr;
+ /**/
/**< Mutex for each stream */
pthread_mutex_t mutex;
@@ -149,7 +152,6 @@ struct cubeb_stream {
cubeb_data_callback data_callback;
cubeb_state_callback state_callback;
- void * user_ptr;
cubeb_stream_params in_params;
cubeb_stream_params out_params;