Pause Edit


Is it possible to temporarily “deactivate” an Edit so that audio processing is “paused” (in order to save processor load)?

I have a situation where it is very convenient to have two Edits loaded at the same time and switching between them but they are never played back at the same time. I was thinking that CPU load may be reduced if the Edit that is not currently active was deactivated.

Yes, you can call TransportControl::freePlaybackContext to free the playback graph and remove it from the audio callback. (Use TransportControl::ensureContextAllocated to start it again.)

This doesn’t unload the plugins though so they’ll still use memory and any idle CPU they consume.

We do this when switching Edit tabs in Waveform.

Perfect! Thanks!

I have been using this solution now and it works very well!

I also experimented now with setting Edit::playInStopEnabled to false. While it also works as expected, I’m wondering if there is any way to “delay” the shutdown of the playback so that reverb etc. can ring out?

Unfortunately not, that would be a bit fiddly and beyond the scope of this feature really. The idea is that the audio graph is only constructed for the duration of playback.
It’s not impossible to add, just something I don’t really have time to do at the moment as you could probably get the same behaviour yourself by manually freeing the playback context when the transport stops, after a delay.

Thanks, no problem!