Closed klesun closed 8 years ago
var presets: IPreset[] = null; var drumPreset: IDrumPreset = null; $.getJSON(soundfontDirUrl + '/presets.json', (result) => presets = result); $.getJSON(soundfontDirUrl + '/drumPreset.json', (result) => drumPreset = result);
As you may see, we are relying on fact nobody uses SoundFontAdapter first couple of seconds after page load.
But the nobody does use the adapter instantly on page load. The nobody's name is Handler.ts::handleHashChange().
Reproducing:
setTimeout(play, 1000);
play();
The solution i need - in fetchSample() if info not loaded - request same fetchSample() call when info loaded and return null
fetchSample()
null
2957e04..1ee1b93
As you may see, we are relying on fact nobody uses SoundFontAdapter first couple of seconds after page load.
But the nobody does use the adapter instantly on page load. The nobody's name is Handler.ts::handleHashChange().
Reproducing:
setTimeout(play, 1000);
to justplay();
in Handler.ts