| 2275 | } |
| 2276 | |
| 2277 | void ImHandleNoteOn(ImMidiChannel* channel, s32 instrumentId, s32 velocity) |
| 2278 | { |
| 2279 | if (!channel) { return; } |
| 2280 | |
| 2281 | u32 channelMask = c_channelMask[channel->channelId]; |
| 2282 | if (channel->instrumentMask[instrumentId] & channelMask) |
| 2283 | { |
| 2284 | ImNoteOff(channel->channelId, instrumentId); |
| 2285 | } |
| 2286 | else |
| 2287 | { |
| 2288 | if (channel->instrumentMask2[instrumentId] & channelMask) |
| 2289 | { |
| 2290 | channel->instrumentMask2[instrumentId] &= ~channelMask; |
| 2291 | ImNoteOff(channel->channelId, instrumentId); |
| 2292 | } |
| 2293 | } |
| 2294 | |
| 2295 | channel->instrumentMask[instrumentId] |= channelMask; |
| 2296 | ImNoteOn(channel->channelId, instrumentId, velocity); |
| 2297 | } |
| 2298 | |
| 2299 | void ImMidi_DrumOut_NoteOn(s32 priority, s32 partNoteReq, s32 volume, s32 instrumentId, s32 velocity) |
| 2300 | { |
no test coverage detected