mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AUv3 Wrapper: Use correct timestamps for outgoing events
Previously, with two instances of the MIDILogger AUv3 in series in Logic, the timestamps received by the second plugin in the chain would not match the timestamps of the events emitted by the first plugin.
This commit is contained in:
parent
f12cac596b
commit
2678c1d10d
1 changed files with 5 additions and 1 deletions
|
|
@ -1607,7 +1607,11 @@ private:
|
|||
{
|
||||
if (auto midiOut = midiOutputEventBlock)
|
||||
for (const auto metadata : midiMessages)
|
||||
midiOut (metadata.samplePosition, 0, metadata.numBytes, metadata.data);
|
||||
if (isPositiveAndBelow (metadata.samplePosition, frameCount))
|
||||
midiOut ((int64_t) metadata.samplePosition + (int64_t) (timestamp->mSampleTime + 0.5),
|
||||
0,
|
||||
metadata.numBytes,
|
||||
metadata.data);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue