Competed a TODO to instantiate NoAudioSoundManager if there is no audio engine available or sounds are disabled in config

This commit is contained in:
Pavle Goloskokovic 2018-01-20 21:23:43 +01:00
parent e03108e332
commit 87fa583c47

View file

@ -1,6 +1,6 @@
var BaseSoundManager = require('./BaseSoundManager');
var WebAudioSoundManager = require('./webaudio/WebAudioSoundManager');
var HTML5AudioSoundManager = require('./html5/HTML5AudioSoundManager');
var NoAudioSoundManager = require('./noaudio/NoAudioSoundManager');
var SoundManagerCreator = {
@ -11,8 +11,7 @@ var SoundManagerCreator = {
if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))
{
// TODO add no audio implementation of BaseSoundManager
return new BaseSoundManager(game);
return new NoAudioSoundManager(game);
}
if(deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio))