summaryrefslogtreecommitdiff
path: root/drivers/ao/audio_driver_ao.cpp
diff options
context:
space:
mode:
authorAnton Yabchinskiy <arn@bestmx.ru>2014-11-22 13:05:28 +0300
committerAnton Yabchinskiy <arn@bestmx.ru>2014-11-22 13:38:11 +0300
commitba6d83f3e1323225848c850bff2443568b9c80b8 (patch)
tree2bb3567ece22da20061cb67d60bfe9cda4a42dfe /drivers/ao/audio_driver_ao.cpp
parentf9db628d172949abb3cccf1eb8185ae011dc9e9f (diff)
Check return value of ao_play()
Diffstat (limited to 'drivers/ao/audio_driver_ao.cpp')
-rw-r--r--drivers/ao/audio_driver_ao.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ao/audio_driver_ao.cpp b/drivers/ao/audio_driver_ao.cpp
index 49ce1a8e59..d9a6ebd0de 100644
--- a/drivers/ao/audio_driver_ao.cpp
+++ b/drivers/ao/audio_driver_ao.cpp
@@ -78,8 +78,11 @@ void AudioDriverAO::thread_func(void* p_udata) {
if (ad->exit_thread)
break;
- ao_play(ad->device, reinterpret_cast<char*>(ad->samples_in),
- ad->buffer_size * ad->channels * sizeof(int32_t));
+ if (!ao_play(ad->device, reinterpret_cast<char*>(ad->samples_in),
+ ad->buffer_size * ad->channels * sizeof(int32_t)))
+ {
+ ERR_PRINT("ao_play() failed");
+ }
};
ad->thread_exited = true;