You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, long time since my last message. I hope everything is ok.
I have an array of Patchable called effects where each one is actually an effect (BasiVerb, VAFilter, etc). So it represents a "daisy chain" of effects.
I'm adding and removing effects on the fly and when adding I experiment random crashes. My guess is some method I'm using is not thread safe.
The code is pretty simple:
void AudioEffects::addEffect(EffectUI *newEffect)
{
effects.push_back(newEffect);
if ( effects.size() == 1 ) {
nodeIn0.disconnectOut();
nodeIn1.disconnectOut();
nodeOut0.disconnectIn();
nodeOut1.disconnectIn();
nodeIn0 >> effects[0]->channelOut(0) >> nodeOut0;
nodeIn1 >> effects[0]->channelOut(1) >> nodeOut1;
} else {
int last = effects.size() - 1;
effects[ last - 1 ]->disconnectOut();
nodeOut0.disconnectIn();
nodeOut1.disconnectIn();
effects[ last - 1 ]->channelOut(0) >> effects[ last ]->channelIn(0);
effects[ last - 1 ]->channelOut(1) >> effects[ last ]->channelIn(1);
effects[ last ]->channelOut(0) >> nodeOut0;
effects[ last ]->channelOut(1) >> nodeOut1;
}
}
nodeIn0 and nodeIn1 are just PatchNodes. AudioEffects is also a Patchable and is part of a larger pipeline that includes two Samplers and multiple Amps
I've tried:
unpatching everything and then patching again
stopping audio engine and restarting. This prevent crashes but has two issues: a short hiccup and JACK being disconnected and connected causing manually set "virtual cables" to not reconnect.
I hope you can point me in the right direction, thanks
The text was updated successfully, but these errors were encountered:
I'm sorry but there is no solution for this, as the patch operator >> is not thread-safe, just a few ofxPDSP methods are (only for metering and control).
Making patching thread-safe would require pretty much a big rewrite of ofxPDSP that is not currently planned.
Hi, long time since my last message. I hope everything is ok.
I have an array of Patchable called
effects
where each one is actually an effect (BasiVerb, VAFilter, etc). So it represents a "daisy chain" of effects.I'm adding and removing effects on the fly and when adding I experiment random crashes. My guess is some method I'm using is not thread safe.
The code is pretty simple:
nodeIn0
andnodeIn1
are just PatchNodes.AudioEffects
is also a Patchable and is part of a larger pipeline that includes two Samplers and multiple AmpsI've tried:
I hope you can point me in the right direction, thanks
The text was updated successfully, but these errors were encountered: