Commit bcff6ac1 authored by David Reid's avatar David Reid

Don't return an error when a device is already started/stopped.

parent 467e449e
......@@ -40337,7 +40337,7 @@ MA_API ma_result ma_device_start(ma_device* pDevice)
}
if (ma_device_get_state(pDevice) == ma_device_state_started) {
return MA_INVALID_OPERATION; /* Already started. Returning an error to let the application know because it probably means they're doing something wrong. */
return MA_SUCCESS; /* Already started. */
}
ma_mutex_lock(&pDevice->startStopLock);
......@@ -40397,7 +40397,7 @@ MA_API ma_result ma_device_stop(ma_device* pDevice)
}
if (ma_device_get_state(pDevice) == ma_device_state_stopped) {
return MA_INVALID_OPERATION; /* Already stopped. Returning an error to let the application know because it probably means they're doing something wrong. */
return MA_SUCCESS; /* Already stopped. */
}
ma_mutex_lock(&pDevice->startStopLock);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment