So this is an idea prompted by NEO's earlier posting of his YM2612 emulator. I realized that using it required some lower-level way to access the audio hardware than Sphere currently provides, so I came up with this idea. I call this new API "Audial".
With Audial, you create Streams and Mixers instead of Sound objects. The Stream is fed with audio data and played by way of a Mixer object.
I haven't implemented anything for this yet in minisphere, but my basic idea is something like this:
var mixer = new Mixer(2, 44100, 16); // stereo, 44.1kHz 16-bit
var stream = new Stream(2, 44100, 16);
// maybe do some pre-buffering...
stream.play();
// in update script...
// get the audio data into a buffer/bytearray somehow
stream.feed(buffer);
mixer.update(); // or maybe the engine can even do this?