From 9a74f4b7b8ab8d82c0c91f628df44b53f00e9aef Mon Sep 17 00:00:00 2001 From: sD Date: Sat, 15 Feb 2020 20:03:21 +0100 Subject: don't destroy my audio and use the element for sfx --- webAO/client.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'webAO/client.js') diff --git a/webAO/client.js b/webAO/client.js index 9eb4031..826698b 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -588,7 +588,6 @@ class Client extends EventEmitter { */ handleRMC(args) { viewport.music.pause(); - viewport.music = new Audio(this.musicList[args[1]]); const music = viewport.music; // Music offset + drift from song loading music.totime = args[1]; @@ -1188,7 +1187,7 @@ class Viewport { .forEach(channel => channel.volume = 0.5); this.currentBlipChannel = 0; - this.sfxaudio = new Audio(AO_HOST + "sounds/general/sfx-blipmale.wav"); + this.sfxaudio = document.getElementById("client_sfxaudio"); this.sfxplayed = 0; this.shoutaudio = new Audio(); -- cgit