浏览代码

Adapt messages to receive from any channel

Use higher bits of first message byte to get notes from all channels.
feature/data-structs
父节点
当前提交
1f7f00e39b
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      src/packages/game/input/IZ_midi.c

+ 2
- 1
src/packages/game/input/IZ_midi.c 查看文件

@@ -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;



正在加载...
取消
保存