wild-web-midi
wild-web-midi copied to clipboard
Incorrect pitch on mobile devices
See https://github.com/rism-ch/midi-player/issues/21
This also applies on http://zz85.github.io/wild-web-midi, but not when "Run WAV Converter" is used.
At least for this one... https://github.com/zz85/wild-web-midi/blob/1800e925bc7296420d1966c4d44f4578dbe6d331/web_audio_player.js#L72 if we change it into
audioCtx = new window.AudioContext({sampleRate:SAMPLE_RATE});
it will work, at least on my PC.
However the MDN says that the support of 'sampleRate" for AudioContext starts from Chorme 74. Is the support came early enough so that we can apply it safety?
Tested this fix in rism-digital/midi-player, and it solves the problem. Thanks!