22 lines
487 B
C
22 lines
487 B
C
#ifndef MIDI_H
|
|
#define MIDI_H
|
|
|
|
#define _POSIX_C_SOURCE 200809L
|
|
#include <alsa/asoundlib.h>
|
|
#include "synth.h"
|
|
|
|
typedef struct {
|
|
snd_seq_t *seq;
|
|
int port;
|
|
int client;
|
|
Synth *synth; // pointer to the synth we'll drive with MIDI events
|
|
} MidiState;
|
|
|
|
int midiInit(MidiState *m, Synth *synth);
|
|
void midiListInputs(MidiState *m);
|
|
void midiConnect(MidiState *m, int srcClient, int srcPort);
|
|
void midiClose(MidiState *m);
|
|
void *midiThread(void *arg);
|
|
|
|
#endif
|