0001
0002 #ifndef __SOUND_SEQ_MIDI_EVENT_H
0003 #define __SOUND_SEQ_MIDI_EVENT_H
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <sound/asequencer.h>
0013
0014 #define MAX_MIDI_EVENT_BUF 256
0015
0016
0017 struct snd_midi_event {
0018 int qlen;
0019 int read;
0020 int type;
0021 unsigned char lastcmd;
0022 unsigned char nostat;
0023 int bufsize;
0024 unsigned char *buf;
0025 spinlock_t lock;
0026 };
0027
0028 int snd_midi_event_new(int bufsize, struct snd_midi_event **rdev);
0029 void snd_midi_event_free(struct snd_midi_event *dev);
0030 void snd_midi_event_reset_encode(struct snd_midi_event *dev);
0031 void snd_midi_event_reset_decode(struct snd_midi_event *dev);
0032 void snd_midi_event_no_status(struct snd_midi_event *dev, int on);
0033 bool snd_midi_event_encode_byte(struct snd_midi_event *dev, unsigned char c,
0034 struct snd_seq_event *ev);
0035
0036 long snd_midi_event_decode(struct snd_midi_event *dev, unsigned char *buf, long count,
0037 struct snd_seq_event *ev);
0038
0039 #endif