You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
464 B
31 lines
464 B
|
|
#pragma once |
|
|
|
#include <alsa/asoundlib.h> |
|
|
|
#include "types.h" |
|
|
|
|
|
struct alsa_sequencer |
|
{ |
|
snd_seq_t* seq_handle; |
|
snd_seq_port_subscribe_t* subscription; |
|
snd_seq_addr_t src; |
|
snd_seq_addr_t dest; |
|
}; |
|
|
|
struct alsa_note_event |
|
{ |
|
u8 note; |
|
u8 channel; |
|
bool note_on; |
|
}; |
|
|
|
|
|
bool midiOpen(alsa_sequencer* seq); |
|
|
|
bool midiConnect(alsa_sequencer* seq, const char* midi_device); |
|
|
|
alsa_note_event midiProcess(const snd_seq_event_t* ev); |
|
|
|
i32 midiClose(alsa_sequencer* seq);
|
|
|