MCPcopy Create free account
hub / github.com/davy7125/polyphone / processProgramChanged

Method processProgramChanged

sources/context/mididevice.cpp:608–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606}
607
608void MidiDevice::processProgramChanged(int channel, quint8 preset)
609{
610 // Compute the corresponding bank for the current channel
611 quint16 bankNumber = 256 * _midiStates[channel + 1]._controllerValues[32] +
612 _midiStates[channel + 1]._controllerValues[0];
613
614 bool consumed = false;
615 for (int i = 0; i < _listeners.size(); ++i)
616 consumed |= _listeners[i]->processProgramChanged(channel, bankNumber, preset);
617
618 // And possibly update channel -1 if the change has not been consumed
619 if (channel != -1 && !consumed)
620 processProgramChanged(-1, preset);
621}
622
623void MidiDevice::stopAll()
624{

Callers 1

midiCallbackFunction · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected