|
|
|
@@ -1,7 +1,7 @@ |
|
|
|
let playing = []; |
|
|
|
let looping = {}; |
|
|
|
|
|
|
|
const audioBaseUrl = "https://chemicalcrux.org/satiate/media/audio/"; |
|
|
|
const audioBaseUrl = "/media/audio/"; |
|
|
|
|
|
|
|
let audioDict = {}; |
|
|
|
|
|
|
|
@@ -9,7 +9,7 @@ let audioDict = {}; |
|
|
|
|
|
|
|
function playSfx(name) { |
|
|
|
if (audioDict[name] == undefined) { |
|
|
|
console.log(name + " is not loaded yet, dingus"); |
|
|
|
console.error(name + " is not loaded yet, dingus"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -27,13 +27,13 @@ function playSfx(name) { |
|
|
|
|
|
|
|
function playLoop(name) { |
|
|
|
if (audioDict[name] == undefined) { |
|
|
|
console.log(name + " is not loaded yet, dingus"); |
|
|
|
console.error(name + " is not loaded yet, dingus"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// if already playing, just keep going |
|
|
|
if (looping[name] && !looping[name].done) { |
|
|
|
console.log(name + " is already looping"); |
|
|
|
console.warn(name + " is already looping"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|