Process priority and unterrupted playback

Started by j7n, May 31, 2016, 00:17:11

Previous topic - Next topic

manx

Quote from: Saga Musix on June 02, 2016, 13:46:25
QuoteSeparating into 2 independent threads would require another layer of buffering and thus will just increase latency for practically no gain at all.
Not necessarily no gain at all - in some specific situations we could benefit from this, e.g. when using plugin bridging: By implementing this and plugin delay compensation, we could trade all the synchronisation overhead in the plugin bridge with latency, so that audio output would be more stable when using tons of bridged plugins. But yeah, just having a separate thread without what I just said or you said in your post is not going to help anyone.
I would implement that in the realm of plugin threading and leave the actual audio output threading completely out of the picture here. Trading latency for stability certainly would make sense there, possibly even already in the current situation as we are just idle waiting for the bridge thread finishing its rendering. But yeah, solving this properly would make way more sense with an actual delay compensation infrastructure.

j7n

Thank you for the detailed replies.

Some further experimentation: audio thread boost to 15 is completely glitch free at DirectSound latency of 20 ms (not that I need it that low). If I switch tabs or open setup, I can sometimes see the dialogs and pattern pause, but the audio goes on. Perfection! If I boost process priority, I still (rarely) get a click when I interact with the UI.

I remember why I switched away from ASIO. I sometimes open two instances of Modplug, and then to have them both able to play sound, I must go into settings and select a different output channel pair... Two portable copies with different configuration would of course also work here.