Ver código fonte

Adapt messages to receive from any channel

Use higher bits of first message byte to get notes from all channels.
feature/data-structs
TheoryOfNekomata 2 anos atrás
pai
commit
1f7f00e39b
1 arquivos alterados com 2 adições e 1 exclusões
  1. +2
    -1
      src/packages/game/input/IZ_midi.c

+ 2
- 1
src/packages/game/input/IZ_midi.c Ver arquivo

@@ -62,7 +62,8 @@ uint8_t IZ_GetMIDINoteFromName(char* name) {

void IZ_HandleMIDINoteOnOffEvents(PmEvent e, IZ_MIDIInputState* state, IZ_Action* action) {
uint32_t message = e.message;
uint8_t status = message & 0xFFu;
uint8_t status = message & 0xF0u;
// uint8_t channel = message & 0x0Fu;
uint8_t data1 = (message >> 8) & 0xFFu;
// uint8_t data2 = (message >> 16) & 0xFFu;



Carregando…
Cancelar
Salvar