Skip to content
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

Closed
sjaehn opened this issue Oct 26, 2019 · 4 comments
Closed

Odd ev->time.frames make B.Shapr crash in Ardour #6

sjaehn opened this issue Oct 26, 2019 · 4 comments

Comments

@sjaehn
Copy link
Owner

sjaehn commented Oct 26, 2019

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

Bildschirmfoto vom 2019-10-26 21-54-08.

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

Bildschirmfoto von 2019-10-26 22-31-19

The problem is fixed by skipping time_Position events from midi port.

@x42
Copy link

x42 commented Oct 26, 2019

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).

@sjaehn
Copy link
Owner Author

sjaehn commented Oct 26, 2019

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.

@SpotlightKid
Copy link

SpotlightKid commented Oct 26, 2019

Carla also doesn't handle two atom ports correctly: falkTX/Carla#915

@sjaehn
Copy link
Owner Author

sjaehn commented Oct 27, 2019

Done in 9ec78e7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants