-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odd ev->time.frames make B.Shapr crash in Ardour #6
Comments
I highly recommend to only use a single Atom input, but if you must use two, the first one should be the one to receive MIDI input. The 2nd port likely contains garbage (ardour connects it to a silent/scratch buffer). |
Thank you. Your answer is the one I expected / was afraid of. I think port 2 is indeed the problem. At least ev->time.frames contains garbage. Roll back and try to get both, MIDI and time_Position in one atom input. |
Carla also doesn't handle two atom ports correctly: falkTX/Carla#915 |
Done in 9ec78e7 |
Dividing the control atom port to a control and a midi port resulted in a crash in Ardour. It turned out that the plugin received events with ev->time.frames out of the expected range.
ev->time.frames usually ranges between 0 and n_samples. For time_Position events in the control port usually ev->time.frames == 0. For GUI->DSP events (like notify_shapeEvent) ev->time.frames == n_samples .
https://github.com/sjaehn/BShapr/blob/master/src/BShapr.cpp#L397
But the midi port also receives time_Position, but with ev->time.frames > n_samples.
https://github.com/sjaehn/BShapr/blob/master/src/BShapr.cpp#L433
The problem is fixed by skipping time_Position events from midi port.
The text was updated successfully, but these errors were encountered: