-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Explicitly add clips and tracks to their respective containers #7754
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
base: master
Are you sure you want to change the base?
Explicitly add clips and tracks to their respective containers #7754
Conversation
messmerd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested it but it looks good to me
|
I have made some changes, in particular, making My next goal, which I might not achieve in this PR, is to remove the |
messmerd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good still - just a few questions
7b1b287 to
0761402
Compare
|
I just did the simple solution for now by calling |
…ther than in PatternTrack constructor
Maybe this isn't good design. Maybe there is a better way to do this.
0761402 to
852b461
Compare
|
Cool I didn't know you could override the return type of So now Line 121 in 2806a31
Follow up questions (we can deal with these in another PR):
I like the direction you are going with this and code looks good. Haven't tested it though. |
|
Sorry about the wait @allejok96. I might need to rework the design. I wanted this to be a simple fix but to do this properly might require a bit more effort.
I think we should make clips like we are making a simple
No, we should have
Yeah, we should have a signal that is emitted when a
Yeah, its confusing. I want to make this PR improve our livelihoods now, not just a simple fix I think, so the design would have to change.
I am still critical about some parts, but the general idea of being able to create a |
Currently, we add clips and tracks to tracks and track containers in their base classes. As a consequence for adding it to the container before the object has completely finished constructing, the application can crash at selective moments due to the use of an incomplete object (most commonly by usage from the audio thread).
To fix this, callers must now add clips and tracks to their respective containers explicitly after construction has completed.
This is a continuation of #7594, just without being too ambitious to avoid bugs. There is most likely a lot more refactoring that can be done here to make resource management a bit more safe.