if (ma_device_get_state(pDevice) == ma_device_state_started) {
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. */
if (ma_device_get_state(pDevice) == ma_device_state_stopped) {
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. */