[#4] Re-enable iOS hack
Before it was running a 1Hz oscillator for 10ms which caused a huge DC offset when it was done.. Turns out it works if you just immediately stop and disconnect it, without causing DC offsets or other problems.
This commit is contained in:
parent
27d9435d83
commit
ea423577f0
1 changed files with 2 additions and 7 deletions
9
xm.js
9
xm.js
|
|
@ -932,17 +932,12 @@ function play() {
|
|||
jsNode.connect(gainNode);
|
||||
|
||||
// hack to get iOS to play anything
|
||||
/*
|
||||
* this seems to cause other player issues... disabling for now
|
||||
var temp_osc = player.audioctx.createOscillator();
|
||||
temp_osc.connect(player.audioctx.destination);
|
||||
if (temp_osc.noteOn) temp_osc.start = temp_osc.noteOn;
|
||||
temp_osc.frequency.value = 1;
|
||||
temp_osc.start(0);
|
||||
setTimeout(10, function() {
|
||||
temp_osc.disconnect();
|
||||
});
|
||||
*/
|
||||
temp_osc.stop();
|
||||
temp_osc.disconnect();
|
||||
}
|
||||
player.playing = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue