diff options
author | Anton Yabchinskiy <arn@bestmx.ru> | 2014-11-22 03:00:21 +0300 |
---|---|---|
committer | Anton Yabchinskiy <arn@bestmx.ru> | 2014-11-22 13:38:11 +0300 |
commit | 3c2e35ada9f8364355d6fc231e0ca5b6c553233f (patch) | |
tree | 7619668c8a99e914152fc7499ccafbcbc9c87586 /drivers | |
parent | 2f92e2a67ad3fcd98ccff4482fdb75cd6eb33be3 (diff) |
Minor code formatting fixes in ao driver
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ao/audio_driver_ao.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/ao/audio_driver_ao.cpp b/drivers/ao/audio_driver_ao.cpp index d143b4aa6e..6511122583 100644 --- a/drivers/ao/audio_driver_ao.cpp +++ b/drivers/ao/audio_driver_ao.cpp @@ -54,10 +54,10 @@ Error AudioDriverAO::init() { device = ao_open_live(ao_default_driver_id(), &format, 0); ERR_FAIL_COND_V(device == 0, ERR_CANT_OPEN); - int latency = GLOBAL_DEF("audio/output_latency",25); + int latency = GLOBAL_DEF("audio/output_latency", 25); buffer_size = nearest_power_of_2( latency * mix_rate / 1000 ); - samples_in = memnew_arr(int32_t, buffer_size*channels); + samples_in = memnew_arr(int32_t, buffer_size * channels); mutex = Mutex::create(); thread = Thread::create(AudioDriverAO::thread_func, this); @@ -66,10 +66,9 @@ Error AudioDriverAO::init() { }; void AudioDriverAO::thread_func(void* p_udata) { - AudioDriverAO* ad = (AudioDriverAO*)p_udata; - uint64_t usdelay = (ad->buffer_size / float(ad->mix_rate))*1000000; + uint64_t usdelay = (ad->buffer_size / float(ad->mix_rate)) * 1000000; while (!ad->exit_thread) { if (!ad->active) { @@ -78,13 +77,12 @@ void AudioDriverAO::thread_func(void* p_udata) { ad->lock(); ad->audio_server_process(ad->buffer_size, ad->samples_in); ad->unlock(); - }; OS::get_singleton()->delay_usec(usdelay); }; - ad->thread_exited=true; + ad->thread_exited = true; }; void AudioDriverAO::start() { |