mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
PatchChange: fix operator=() implementation which failed to manage event buffer ownership correctly
This commit is contained in:
parent
6175af002c
commit
31f4d8a2ca
1 changed files with 9 additions and 0 deletions
|
|
@ -74,6 +74,15 @@ public:
|
|||
unset ();
|
||||
}
|
||||
|
||||
PatchChange& operator= (PatchChange const & other) {
|
||||
/* Need to be careful with assignment here, due to buffer
|
||||
ownership issues etc.
|
||||
*/
|
||||
_bank_change_msb.set (other._bank_change_msb.buffer(), 3, other.time());
|
||||
_bank_change_lsb.set (other._bank_change_lsb.buffer(), 3, other.time());
|
||||
_program_change.set (other._program_change.buffer(), 2, other.time());
|
||||
return *this;
|
||||
}
|
||||
void unset() {
|
||||
_bank_change_msb.buffer()[1] = 0xf; /* unset */
|
||||
_bank_change_lsb.buffer()[1] = 0xf; /* unset */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue