From fc3a2fca261305f25da0dd965542e6d4df621046 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sun, 12 May 2019 08:12:30 +1000 Subject: [PATCH] Add explicit mention to not call some APIs in callbacks. --- miniaudio.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/miniaudio.h b/miniaudio.h index 45fc9ac6..43b7f54e 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -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 harmless if you do. +Do not call this in any callback. + Return Value: 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 waits on a mutex for thread-safety. +Do not call this in any callback. + Return Value: 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 which can in turn result in de-syncs. +Do not call this in any callback. + Return Value: MA_SUCCESS if successful; any other error code otherwise.