evoral/MIDIEvent: Whitespace cosmetics in header, make XML output work properly eg show the numbers instead of blanks
git-svn-id: svn://localhost/ardour2/branches/3.0@13221 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5c2d7d3644
commit
c3850cfb35
@ -57,9 +57,11 @@ public:
|
|||||||
inline uint8_t type() const { return (this->_buf[0] & 0xF0); }
|
inline uint8_t type() const { return (this->_buf[0] & 0xF0); }
|
||||||
inline void set_type(uint8_t type) { this->_buf[0] = (0x0F & this->_buf[0])
|
inline void set_type(uint8_t type) { this->_buf[0] = (0x0F & this->_buf[0])
|
||||||
| (0xF0 & type); }
|
| (0xF0 & type); }
|
||||||
|
|
||||||
inline uint8_t channel() const { return (this->_buf[0] & 0x0F); }
|
inline uint8_t channel() const { return (this->_buf[0] & 0x0F); }
|
||||||
inline void set_channel(uint8_t channel) { this->_buf[0] = (0xF0 & this->_buf[0])
|
inline void set_channel(uint8_t channel) { this->_buf[0] = (0xF0 & this->_buf[0])
|
||||||
| (0x0F & channel); }
|
| (0x0F & channel); }
|
||||||
|
|
||||||
inline bool is_note_on() const { return (type() == MIDI_CMD_NOTE_ON); }
|
inline bool is_note_on() const { return (type() == MIDI_CMD_NOTE_ON); }
|
||||||
inline bool is_note_off() const { return (type() == MIDI_CMD_NOTE_OFF); }
|
inline bool is_note_off() const { return (type() == MIDI_CMD_NOTE_OFF); }
|
||||||
inline bool is_cc() const { return (type() == MIDI_CMD_CONTROL); }
|
inline bool is_cc() const { return (type() == MIDI_CMD_CONTROL); }
|
||||||
|
@ -60,15 +60,15 @@ MIDIEvent<Time>::to_xml() const
|
|||||||
switch (type()) {
|
switch (type()) {
|
||||||
case MIDI_CMD_CONTROL:
|
case MIDI_CMD_CONTROL:
|
||||||
result = new XMLNode("ControlChange");
|
result = new XMLNode("ControlChange");
|
||||||
result->add_property("Channel", channel());
|
result->add_property("Channel", long(channel()));
|
||||||
result->add_property("Control", cc_number());
|
result->add_property("Control", long(cc_number()));
|
||||||
result->add_property("Value", cc_value());
|
result->add_property("Value", long(cc_value()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MIDI_CMD_PGM_CHANGE:
|
case MIDI_CMD_PGM_CHANGE:
|
||||||
result = new XMLNode("ProgramChange");
|
result = new XMLNode("ProgramChange");
|
||||||
result->add_property("Channel", channel());
|
result->add_property("Channel", long(channel()));
|
||||||
result->add_property("Number", pgm_number());
|
result->add_property("Number", long(pgm_number()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user