Skip to content

Commit b0c7dd0

Browse files
authored
Merge pull request #263 from ruguevara/master
Fix MIDI timestamp handling in FourOscPlugin for sample-accurate timing
2 parents 0a5f4e6 + 5a49399 commit b0c7dd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/tracktion_engine/plugins/effects/tracktion_FourOscPlugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ void FourOscPlugin::applyToBuffer (const PluginRenderContext& fc)
14871487
{
14881488
for (auto m : *fc.bufferForMidiMessages)
14891489
{
1490-
int midiPos = int (m.getTimeStamp());
1490+
int midiPos = juce::roundToInt (m.getTimeStamp() * getSampleRate());
14911491
if (midiPos >= pos && midiPos < pos + thisBlock)
14921492
midi.addEvent (m, midiPos - pos);
14931493
}

0 commit comments

Comments
 (0)