NodeProxy fadeTime > 0 leads to hung nodes with Pmono #5824
Labels
bug
Issues that relate to unexpected/unwanted behavior. Don't use for PRs.
comp: class library
SC class library
comp: JITlib
Environment
Steps to reproduce
Expected vs. actual behavior
(Apologies if this has been reported before, I didn't see it when searching through the history, though I did find several past issues with
Pmono
and other pieces of JITLib.)My expectation would be that fading between two
Ndef
s withPmono
would not result in any hung notes. In my initial investigation I noticed thatPatternControl
calls thexstop
extension method to initiate a fadeout usingPfadeOut
, and then schedules a future stop on the stream player to trigger cleanup:https://github.com/supercollider/supercollider/blob/develop/SCClassLibrary/JITLib/ProxySpace/ProxyInterfaces.sc#L141
https://github.com/supercollider/supercollider/blob/develop/SCClassLibrary/JITLib/Patterns/extRoutine.sc#L41
From what I can tell tracing through the code, the cleanup function on
PmonoStream
is simply not getting triggered, which maybe makes sense sincePatternControl
is just swapping out the stream on the already playingEventStreamPlayer
instead of creating a new one and playing it. At the timePmonoStream
registers the cleanup function the parent stream doesn't exist yet, and so the cleanup function isn't ever communicated up the hierarchy.Additional notes
I managed to "fix" this with a crude hack in
PatternControl.stopStreams
, by making a copy of the event stream players before callingxstop
:I assume this is probably not the right way to address the problem, and admit to only sort of understanding how
EventStreamCleanup
is supposed to work in practice.The text was updated successfully, but these errors were encountered: