Fixed an possible sounds issue
This commit is contained in:
parent
97a4ca8a9b
commit
fd02eee9c1
1 changed files with 4 additions and 0 deletions
|
@ -240,6 +240,10 @@ namespace sound {
|
|||
|
||||
const path = "audio/" + file.filename;
|
||||
const context = audio.player.context();
|
||||
if(!context) {
|
||||
console.warn(tr("Tried to replay a sound without an audio context (Sound: %o). Dropping playback"), sound);
|
||||
return;
|
||||
}
|
||||
const volume = get_sound_volume(sound, options.default_volume);
|
||||
|
||||
console.log(tr("Replaying sound %s (Sound volume: %o | Master volume %o)"), sound, volume, master_volume);
|
||||
|
|
Loading…
Add table
Reference in a new issue