2021-04-25 22:50:45 -04:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2021-05-21 11:58:10 -04:00
|
|
|
/* #include <portmidi.h> */
|
2021-04-25 22:50:45 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Copyright (c) 2021 Devine Lu Linvega
|
|
|
|
Copyright (c) 2021 Andrew Alderwick
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and distribute this software for any
|
|
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
WITH REGARD TO THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef unsigned char Uint8;
|
|
|
|
|
2021-05-21 11:58:10 -04:00
|
|
|
typedef struct {
|
|
|
|
int message;
|
|
|
|
} PmEvent;
|
|
|
|
|
2021-04-25 22:50:45 -04:00
|
|
|
typedef struct {
|
|
|
|
Uint8 queue;
|
|
|
|
PmEvent events[32];
|
2021-05-21 11:58:10 -04:00
|
|
|
/*
|
|
|
|
PmStream *midi;
|
2021-05-08 10:59:03 -04:00
|
|
|
PmError error;
|
2021-05-21 11:58:10 -04:00
|
|
|
*/
|
2021-04-25 22:50:45 -04:00
|
|
|
} Mpu;
|
|
|
|
|
|
|
|
int initmpu(Mpu *m, Uint8 device);
|
|
|
|
void listenmpu(Mpu *m);
|