You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Add closest_power_of_2 func and implement mix_rate/latency on OS X
This commit is contained in:
@@ -43,7 +43,7 @@ Error AudioDriverMediaKit::init() {
|
||||
channels = 2;
|
||||
|
||||
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);
|
||||
samples_in = memnew_arr(int32_t, buffer_size * channels);
|
||||
|
||||
media_raw_audio_format format;
|
||||
|
||||
Reference in New Issue
Block a user