Skip to content

Commit

Permalink
Add dummy nop message to indicate end
Browse files Browse the repository at this point in the history
  • Loading branch information
dlunch committed Feb 6, 2024
1 parent 357d108 commit 3f67717
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions smaf/src/chunks/score_track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ impl MobileStandardSequenceData {
if second_byte == 0x2F {
let (remaining, _) = u8(data)?;
data = remaining;

// XXX dummy nop message to play until end
result.push(Self {
duration,
event: SequenceEvent::Nop,
});

break;
} else if second_byte == 0x00 {
SequenceEvent::Nop
Expand Down
3 changes: 2 additions & 1 deletion smaf_player/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ impl<'a> ScoreTrackPlayer<'a> {
self.backend.midi_program_change(channel, program);
}
SequenceEvent::Exclusive(_) => {}
_ => unimplemented!(),
SequenceEvent::Nop => {}
SequenceEvent::PitchBend { .. } => {}
}
}
}
Expand Down

0 comments on commit 3f67717

Please sign in to comment.