summaryrefslogtreecommitdiff
path: root/drivers/alsa/audio_driver_alsa.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-08-18 08:12:56 +0200
committerGitHub <noreply@github.com>2017-08-18 08:12:56 +0200
commit1a92906b681735a5a2acfd98e3d6a4c75a7f6115 (patch)
treef01757ba9a3b618df7da54b0698134b1a9f03e3f /drivers/alsa/audio_driver_alsa.cpp
parent3a4ff3402dedab5f30b0f97aeadec6cf61f29a40 (diff)
parenteab850524ead092ed9fe22e57955e59eae373b79 (diff)
Merge pull request #10406 from marcelofg55/closest_power_of_2
Add closest_power_of_2 func and implement mix_rate/latency on OS X
Diffstat (limited to 'drivers/alsa/audio_driver_alsa.cpp')
-rw-r--r--drivers/alsa/audio_driver_alsa.cpp2
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);