diff options
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r-- | src/library_sdl.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index f06fade7..ecfc84cc 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -1455,7 +1455,6 @@ var LibrarySDL = { // SDL_Audio SDL_OpenAudio: function(desired, obtained) { - // On Firefox, we prefer Mozilla Audio API. Otherwise, use WebAudioAPI. try { SDL.audio = { freq: {{{ makeGetValue('desired', 'SDL.structs.AudioSpec.freq', 'i32', 0, 1) }}}, @@ -1520,7 +1519,8 @@ var LibrarySDL = { }; SDL.audio.audioOutput = new Audio(); - if (typeof(SDL.audio.audioOutput['mozSetup'])==='function') { // Primarily use Mozilla Audio Data API if available. + // As a workaround use Mozilla Audio Data API on Firefox until it ships with Web Audio and sound quality issues are fixed. + if (typeof(SDL.audio.audioOutput['mozSetup'])==='function') { SDL.audio.audioOutput['mozSetup'](SDL.audio.channels, SDL.audio.freq); // use string attributes on mozOutput for closure compiler SDL.audio.mozBuffer = new Float32Array(totalSamples); SDL.audio.nextPlayTime = 0; |