X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fmidi_scene_change.cc;h=9304a6432322539acf417fbabca6e169ec57d219;hb=10a4de155034ffce6b3bc97d0cf91ba8f8e99812;hp=aede5c4b90c0f5596b9a2a6f25227a20cffd513e;hpb=9254e80c396265f484adb3b7bf5f0b502d096107;p=ardour.git diff --git a/libs/ardour/midi_scene_change.cc b/libs/ardour/midi_scene_change.cc index aede5c4b90..9304a64323 100644 --- a/libs/ardour/midi_scene_change.cc +++ b/libs/ardour/midi_scene_change.cc @@ -77,7 +77,7 @@ MIDISceneChange::get_bank_lsb_message (uint8_t* buf, size_t size) const buf[0] = 0xB0 | (_channel & 0xf); buf[1] = 0x20; - buf[2] = _bank & 0x7f; + buf[2] = _bank & 0x7f; return 3; } @@ -123,7 +123,7 @@ MIDISceneChange::set_state (const XMLNode& node, int /* version-ignored */) return -1; } - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property (X_("program"))) == 0) { return -1; @@ -141,10 +141,10 @@ MIDISceneChange::set_state (const XMLNode& node, int /* version-ignored */) _channel = atoi (prop->value()); if ((prop = node.property (X_("color"))) != 0) { - _color = atoi (prop->value()); - } else { - _color = out_of_bound_color; - } + _color = atoi (prop->value()); + } else { + _color = out_of_bound_color; + } return 0; } @@ -152,7 +152,27 @@ MIDISceneChange::set_state (const XMLNode& node, int /* version-ignored */) bool MIDISceneChange::operator==(const MIDISceneChange& other) const { - return _program == other._program && - _bank == other._bank && - _channel == other._channel; + return _program == other._program && + _bank == other._bank && + _channel == other._channel; +} + +void +MIDISceneChange::set_channel (int channel) +{ + _channel = channel; +} + +void +MIDISceneChange::set_program (int program) +{ + _program = program; +} + +void +MIDISceneChange::set_bank (int bank) +{ + _bank = bank; } + +