-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix my regression (b7d25b0) in sequence loop end/play end handling. #147
Fix my regression (b7d25b0) in sequence loop end/play end handling. #147
Conversation
src/lib/core/sequence.c
Outdated
* @length: the new value requested for length | ||
* | ||
* Handles making sure that loop-end doesn't extend past song length, and also | ||
* makes sure that loop-end is set to the song length, then the loop-end is |
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.
sure that if loop-end is set ...
src/lib/core/sequence.c
Outdated
*/ | ||
static void | ||
bt_sequence_post_length_change (const BtSequence * const self, | ||
guint old_length) |
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.
gulong old_length
to avoid truncating
src/lib/core/sequence.c
Outdated
bt_sequence_resize_data_length (const BtSequence * const self, const gulong length) | ||
{ | ||
const gulong tracks = self->priv->tracks; | ||
|
||
const gulong old_length = self->priv->len_patterns; | ||
|
||
// try to shrink the pattern up to the row having the final non-empty pattern cell | ||
/* Try to shrink the pattern up to the row having the final non-empty pattern |
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.
s/pattern/sequence/
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.
Thanks for the follow up. Only a few nits.
Removed "len-patterns" property setter. This property may not agree to set itself to a value that would cause pattern truncation, so the value supplied to g_object_set may not match g_object_get. Not only does this confuse the automated tests (check_readwrite_long_param) but sequence data size management should ideally be a hidden implementation detail.
48c7c03
to
bc9d420
Compare
Nits are good too, fixed those. Thanks! |
Also removed "len-patterns" property setter. This property may not agree to set itself to a value that would cause pattern truncation, so the value supplied to g_object_set may not match g_object_get. Not only does this confuse the automated tests (check_readwrite_long_param) but sequence data size management should ideally be a hidden implementation detail.
Fixes #136.