rename midi write()/read() to stream_write() stream_read()
also add deprecated for warning and rename hint
This commit is contained in:
@@ -186,10 +186,12 @@ void midi_task(void)
|
||||
if (previous < 0) previous = sizeof(note_sequence) - 1;
|
||||
|
||||
// Send Note On for current position at full velocity (127) on channel 1.
|
||||
tud_midi_write24(cable_num, 0x90 | channel, note_sequence[note_pos], 127);
|
||||
uint8_t note_on[3] = { 0x90 | channel, note_sequence[note_pos], 127 };
|
||||
tud_midi_stream_write(cable_num, note_on, 3);
|
||||
|
||||
// Send Note Off for previous note.
|
||||
tud_midi_write24(cable_num, 0x80 | channel, note_sequence[previous], 0);
|
||||
uint8_t note_off[3] = { 0x80 | channel, note_sequence[previous], 0};
|
||||
tud_midi_stream_write(cable_num, note_off, 3);
|
||||
|
||||
// Increment position
|
||||
note_pos++;
|
||||
|
Reference in New Issue
Block a user