A rule change for stop notifications.

This commit is contained in:
David Reid
2026-01-03 07:16:26 +10:00
parent e81a11e725
commit c64a5c7457
+5 -8
View File
@@ -43822,14 +43822,11 @@ static ma_result ma_device_op_do_stop(ma_device* pDevice, ma_device_op_completio
ma_device_set_status(pDevice, ma_device_status_stopped); ma_device_set_status(pDevice, ma_device_status_stopped);
/* /* A stop event should always be posted when the device has stopped. */
After the device has stopped, make sure an event is posted. Don't post a stopped event if ma_device_post_notification_stopped(pDevice);
stopping failed. This can happen on some backends when the underlying stream has been
stopped due to the device being physically unplugged or disabled via an OS setting. /* Silence an assigned but not used warning (we're always returning MA_SUCCESS here for now). We might change this later to return void. */
*/ (void)result;
if (result == MA_SUCCESS) {
ma_device_post_notification_stopped(pDevice);
}
ma_device_op_completion_event_signal(pCompletionEvent, MA_SUCCESS); ma_device_op_completion_event_signal(pCompletionEvent, MA_SUCCESS);
return MA_SUCCESS; return MA_SUCCESS;