You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[Web] Gracefully handle non-finite audio volumes
This commit is contained in:
@@ -858,7 +858,10 @@ class Bus {
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
setVolumeDb(val) {
|
setVolumeDb(val) {
|
||||||
this._gainNode.gain.value = GodotAudio.db_to_linear(val);
|
const linear = GodotAudio.db_to_linear(val);
|
||||||
|
if (isFinite(linear)) {
|
||||||
|
this._gainNode.gain.value = linear;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user