mirror of
https://github.com/godotengine/godot
synced 2024-09-16 03:17:53 +00:00
Check return value of ao_play()
This commit is contained in:
parent
f9db628d17
commit
ba6d83f3e1
|
@ -78,8 +78,11 @@ void AudioDriverAO::thread_func(void* p_udata) {
|
||||||
if (ad->exit_thread)
|
if (ad->exit_thread)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ao_play(ad->device, reinterpret_cast<char*>(ad->samples_in),
|
if (!ao_play(ad->device, reinterpret_cast<char*>(ad->samples_in),
|
||||||
ad->buffer_size * ad->channels * sizeof(int32_t));
|
ad->buffer_size * ad->channels * sizeof(int32_t)))
|
||||||
|
{
|
||||||
|
ERR_PRINT("ao_play() failed");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ad->thread_exited = true;
|
ad->thread_exited = true;
|
||||||
|
|
Loading…
Reference in a new issue