Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Midi Flush not working #25

Open
luismartimor opened this issue Mar 2, 2017 · 1 comment
Open

Midi Flush not working #25

luismartimor opened this issue Mar 2, 2017 · 1 comment

Comments

@luismartimor
Copy link

luismartimor commented Mar 2, 2017

Need to cancel the sending of packets that were previously scheduled for future delivery.

Tried with this:
for (int i=0;i<midi.destinations.count;i++){
PGMidiDestination *destination = [[midi destinations] objectAtIndex:i];
[destination flushOutput];
}

Not working, then, I add these methods to PGMidi.mm

  • (void) flushOutput {
    MIDIFlushOutput(0);
    }

  • (void) flushOutput2
    {
    for (ItemCount index = 0; index < MIDIGetNumberOfDestinations(); ++index)
    {
    MIDIEndpointRef outputEndpoint = MIDIGetDestination(index);
    if (outputEndpoint) {MIDIFlushOutput(outputEndpoint); }
    }
    }

Not working, the sended notes still playing after flush. Any ideas ?

@hgwhittle
Copy link

Same, specifically over network MIDI.

Non-network destination stops sending as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants