From a51267419df1fee3c13175f9006a6ba712ffb56d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 22 Nov 2021 23:53:56 +0000 Subject: [PATCH] Use cache reference, more concise error --- src/sound/html5/HTML5AudioSound.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index a1c12cff0..f5583058d 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -44,11 +44,11 @@ var HTML5AudioSound = new Class({ * @private * @since 3.0.0 */ - this.tags = manager.game.cache.audio.get(key); + this.tags = manager.cache.get(key); if (!this.tags) { - throw new Error('There is no audio asset with key "' + key + '" in the audio cache'); + throw new Error('Audio cache missing "' + key + '"'); } /** @@ -92,6 +92,8 @@ var HTML5AudioSound = new Class({ this.totalDuration = this.tags[0].duration; BaseSound.call(this, manager, key, config); + + console.log('HTML5AudioSound created', this.tags); }, /**