How to notify the main thread when playback is finished? #458
-
|
I want the uninits to occur automatically from the Main thread after the playback is finished by the worker. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
No, you need to manage that yourself. It's just standard multi-threaded notification stuff. Set a variable or signal some kind of synchronization primitive that the main thread is continuously monitoring. When the variable is set, or the sync primitive is signalled, have the main thread do the uninit process. Alternatively, consider using the high level API which will allow you to skip the data callback completely. |
Beta Was this translation helpful? Give feedback.
No, you need to manage that yourself. It's just standard multi-threaded notification stuff. Set a variable or signal some kind of synchronization primitive that the main thread is continuously monitoring. When the variable is set, or the sync primitive is signalled, have the main thread do the uninit process.
Alternatively, consider using the high level API which will allow you to skip the data callback completely.