summaryrefslogtreecommitdiffstats
path: root/platform/javascript/audio_driver_javascript.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-09-13 03:06:34 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-09-15 11:56:21 +0200
commitd187bb4e11182ee3edbc0008dba5762148bc530d (patch)
treed0d3b7b75610599bce87d35e40012605cce11fdf /platform/javascript/audio_driver_javascript.cpp
parentf2c44949c07e5ec2aadf519fca98e5bb1517f74c (diff)
downloadredot-engine-d187bb4e11182ee3edbc0008dba5762148bc530d.tar.gz
[HTML5] Use browser mix rate by default on the Web.
Browsers doesn't really like forcing the mix rate, e.g. Firefox does not allow input (microphone) if the mix rate is not the default one, Chrom* will exhibit worse performances, etc.
Diffstat (limited to 'platform/javascript/audio_driver_javascript.cpp')
-rw-r--r--platform/javascript/audio_driver_javascript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp
index 478e848675..420cb2f2f7 100644
--- a/platform/javascript/audio_driver_javascript.cpp
+++ b/platform/javascript/audio_driver_javascript.cpp
@@ -108,7 +108,7 @@ Error AudioDriverJavaScript::init() {
mix_rate = GLOBAL_GET("audio/driver/mix_rate");
int latency = GLOBAL_GET("audio/driver/output_latency");
- channel_count = godot_audio_init(mix_rate, latency, &_state_change_callback, &_latency_update_callback);
+ channel_count = godot_audio_init(&mix_rate, latency, &_state_change_callback, &_latency_update_callback);
buffer_length = closest_power_of_2((latency * mix_rate / 1000));
#ifndef NO_THREADS
node = memnew(WorkletNode);