Skip to content

Commit

Permalink
#1162 Pass timing information on when sending from device MIDI to dev…
Browse files Browse the repository at this point in the history
…ice MIDI
  • Loading branch information
helgoboss committed Sep 3, 2024
1 parent 6fb6445 commit cee7b55
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main/src/domain/targets/midi_send_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ impl MidiSendTarget {
MidiOutputDevice::new(dev_id).with_midi_output(
|mo| -> Result<(), &'static str> {
let mo = mo.ok_or("couldn't open MIDI output device")?;
mo.send_msg(raw_midi_event, SendMidiTime::Instantly);
let sample_offset = value_event.offset().get() as u32;
mo.send_msg(
raw_midi_event,
SendMidiTime::AtFrameOffset(sample_offset),
);
Ok(())
},
)?;
Expand Down

0 comments on commit cee7b55

Please sign in to comment.