1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Add closest_power_of_2 func and implement mix_rate/latency on OS X

This commit is contained in:
Marcelo Fernandez
2017-08-17 18:35:55 -03:00
parent 33c1d25517
commit eab850524e
27 changed files with 144 additions and 95 deletions

View File

@@ -81,7 +81,7 @@ Error AudioDriverAndroid::init() {
int latency = GLOBAL_DEF("audio/output_latency", 25);
latency = 50;
unsigned int buffer_size = nearest_power_of_2(latency * mix_rate / 1000);
unsigned int buffer_size = next_power_of_2(latency * mix_rate / 1000);
if (OS::get_singleton()->is_stdout_verbose()) {
print_line("audio buffer size: " + itos(buffer_size));
}