diff options
author | Marcelo Fernandez <marcelofg55@gmail.com> | 2017-08-17 18:35:55 -0300 |
---|---|---|
committer | Marcelo Fernandez <marcelofg55@gmail.com> | 2017-08-17 19:51:13 -0300 |
commit | eab850524ead092ed9fe22e57955e59eae373b79 (patch) | |
tree | 1ec2718c0810d852b51c4d40c135f4dde3841906 /drivers/alsa | |
parent | 33c1d25517050470689924c60414feaf295ce05f (diff) |
Add closest_power_of_2 func and implement mix_rate/latency on OS X
Diffstat (limited to 'drivers/alsa')
-rw-r--r-- | drivers/alsa/audio_driver_alsa.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp index 4e6739e8c0..a6b9748129 100644 --- a/drivers/alsa/audio_driver_alsa.cpp +++ b/drivers/alsa/audio_driver_alsa.cpp @@ -87,7 +87,7 @@ Error AudioDriverALSA::init() { CHECK_FAIL(status < 0); int latency = GLOBAL_DEF("audio/output_latency", 25); - buffer_size = nearest_power_of_2(latency * mix_rate / 1000); + buffer_size = closest_power_of_2(latency * mix_rate / 1000); // set buffer size from project settings status = snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hwparams, &buffer_size); |