Emscripten: init SDL mixer frequency based on Web Audio API information #641

Closed
fdelapena opened this Issue Oct 21, 2015 · 1 comment

Projects

None yet

2 participants

@fdelapena
Member

This should prevent some well known audio playback noise issues because the Web Audio API does not allow to change this setting.

This can be performed by Calling JavaScript from C/C++ and related API functions.

@fdelapena fdelapena added the HTML5 label Oct 21, 2015
@carstene1ns
Member

untested patch:

#ifdef EMSCRIPTEN
int sampleRate = EM_ASM_INT_V({
var context;
try {
  context = new AudioContext();
} catch (e) {
  context = new webkitAudioContext();
}
return context.sampleRate;
});
#endif
@fdelapena fdelapena added a commit to fdelapena/easyrpg-player that referenced this issue Oct 26, 2015
@carstene1ns @fdelapena carstene1ns + fdelapena Emscripten: init SDL mixer frequency based on Web Audio API informati…
…on (fixes #641)
7caf661
@fdelapena fdelapena added a commit to fdelapena/easyrpg-player that referenced this issue Nov 20, 2015
@carstene1ns @fdelapena carstene1ns + fdelapena Emscripten: init SDL mixer frequency based on Web Audio API informati…
…on (fixes #641)
d7fa841
@fdelapena fdelapena added a commit to fdelapena/easyrpg-player that referenced this issue Nov 27, 2015
@carstene1ns @fdelapena carstene1ns + fdelapena Emscripten: init SDL mixer frequency based on Web Audio API informati…
…on (fixes #641)
bd29392
@Ghabry Ghabry closed this in #643 Dec 5, 2015
@fdelapena fdelapena added this to the 0.4 milestone Dec 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment