|
@@ -100,7 +100,7 @@ Error AudioDriverJavaScript::init() {
|
|
int latency = GLOBAL_GET("audio/output_latency");
|
|
int latency = GLOBAL_GET("audio/output_latency");
|
|
|
|
|
|
channel_count = godot_audio_init(mix_rate, latency);
|
|
channel_count = godot_audio_init(mix_rate, latency);
|
|
- buffer_length = closest_power_of_2((latency * mix_rate / 1000) * channel_count);
|
|
|
|
|
|
+ buffer_length = closest_power_of_2(latency * mix_rate / 1000);
|
|
buffer_length = godot_audio_create_processor(buffer_length, channel_count);
|
|
buffer_length = godot_audio_create_processor(buffer_length, channel_count);
|
|
if (!buffer_length) {
|
|
if (!buffer_length) {
|
|
return FAILED;
|
|
return FAILED;
|