diff options
author | Anton Yabchinskiy <arn@bestmx.ru> | 2014-11-22 17:55:22 +0300 |
---|---|---|
committer | Anton Yabchinskiy <arn@bestmx.ru> | 2014-11-22 17:55:22 +0300 |
commit | 6bfdfa041a0097db491e0d36ce9d41e125361298 (patch) | |
tree | 2553dccf92b998da6683d697ebf2285414b5a7c3 | |
parent | e696dba522b3f4b9a3d3bc8ec3d6a09123d9ee50 (diff) | |
parent | 298f6be9bf47e5948f2242747cce4214143d1432 (diff) |
Merge branch 'libao'
-rw-r--r-- | drivers/ao/audio_driver_ao.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ao/audio_driver_ao.cpp b/drivers/ao/audio_driver_ao.cpp index 3c4aa454e7..b42e3af6bb 100644 --- a/drivers/ao/audio_driver_ao.cpp +++ b/drivers/ao/audio_driver_ao.cpp @@ -31,6 +31,8 @@ #include "globals.h" #include "os/os.h" +#include <cstring> + Error AudioDriverAO::init() { active = false; @@ -68,7 +70,8 @@ Error AudioDriverAO::init() { void AudioDriverAO::thread_func(void* p_udata) { AudioDriverAO* ad = (AudioDriverAO*)p_udata; - int16_t* samples_out = samples_in; // Overwrite samples on conversion + // Overwrite samples on conversion + int16_t* samples_out = reinterpret_cast<int16_t*>(ad->samples_in); unsigned int n_samples = ad->buffer_size * ad->channels; unsigned int n_bytes = n_samples * sizeof(int16_t); @@ -88,7 +91,7 @@ void AudioDriverAO::thread_func(void* p_udata) { if (ad->exit_thread) break; - if (!ao_play(ad->device, reinterpret_cast<char*>(samples_out), n_bytes) { + if (!ao_play(ad->device, reinterpret_cast<char*>(samples_out), n_bytes)) { ERR_PRINT("ao_play() failed"); } }; |