Closed sowbug closed 1 year ago
What's going on:
canvas
experiment and was naively clearing it on every window frame. This is a known issue.MidiSubscription
is being dumb. It loops while waiting for an event, and it sleeps a little in between.EngineSubscription
, but the problem is more complicated because cpal
should be telling it when to create another buffer of audio.Solution:
canvas
experiment.MidiSubscription
first. My plan is to create a signal of some sort (probably std::sync::Condvar) and teach everyone to use it when they have something for the service.
I think we need two kinds of channels, one async in the subscription, and one sync (but guaranteed not to block) in the background.