Add explicit mention to not call some APIs in callbacks.

This commit is contained in:
David Reid
2019-05-12 08:12:30 +10:00
parent d289e5cf6f
commit fc3a2fca26
+6
View File
@@ -2788,6 +2788,8 @@ Uninitializes a device.
This will explicitly stop the device. You do not need to call ma_device_stop() beforehand, but it's This will explicitly stop the device. You do not need to call ma_device_stop() beforehand, but it's
harmless if you do. harmless if you do.
Do not call this in any callback.
Return Value: Return Value:
MA_SUCCESS if successful; any other error code otherwise. MA_SUCCESS if successful; any other error code otherwise.
@@ -2816,6 +2818,8 @@ to be done _before_ the device begins playback.
This API waits until the backend device has been started for real by the worker thread. It also This API waits until the backend device has been started for real by the worker thread. It also
waits on a mutex for thread-safety. waits on a mutex for thread-safety.
Do not call this in any callback.
Return Value: Return Value:
MA_SUCCESS if successful; any other error code otherwise. MA_SUCCESS if successful; any other error code otherwise.
@@ -2837,6 +2841,8 @@ the resuming it with ma_device_start() (which you might do when your program los
in a situation where those samples are never output to the speakers or received from the microphone in a situation where those samples are never output to the speakers or received from the microphone
which can in turn result in de-syncs. which can in turn result in de-syncs.
Do not call this in any callback.
Return Value: Return Value:
MA_SUCCESS if successful; any other error code otherwise. MA_SUCCESS if successful; any other error code otherwise.