mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add closest_power_of_2 func and implement mix_rate/latency on OS X
This commit is contained in:
parent
49028e0c49
commit
647c4ae5bf
25 changed files with 136 additions and 87 deletions
|
|
@ -54,7 +54,7 @@ Error AudioDriverPulseAudio::init() {
|
|||
spec.rate = mix_rate;
|
||||
|
||||
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);
|
||||
|
||||
pa_buffer_attr attr;
|
||||
// set to appropriate buffer size from global settings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue