diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-06-18 08:37:29 +0300 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-24 16:56:45 -0700 |
commit | 72aaf4a352bfb94726b3710e7824ea3d964c7631 (patch) | |
tree | 6f5d2a11ce92e20f16d3f414cc67835325c5c14b | |
parent | a4f4ce25e5f38e89001fcc17f5b0bad503132926 (diff) |
Document Mozilla Audio Data API is used as a workaround.
-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; |