Skip to content

Commit

Permalink
[Web] Gracefully handle non-finite audio volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
AThousandShips committed Jul 28, 2024
1 parent 607b230 commit 80110f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion platform/web/js/libs/library_godot_audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,11 @@ class Bus {
* @returns {void}
*/
setVolumeDb(val) {
this._gainNode.gain.value = GodotAudio.db_to_linear(val);
try {
this._gainNode.gain.value = GodotAudio.db_to_linear(val);
} catch (e) {
GodotRuntime.error('Failed updating volume.', e);
}
}

/**
Expand Down

0 comments on commit 80110f8

Please sign in to comment.