1 /****************************************************************************
3 * Sequencer event <-> MIDI byte stream coder *
5 ****************************************************************************/
11 typedef struct snd_midi_event snd_midi_event_t;
13 int snd_midi_event_new(int bufsize, snd_midi_event_t **rdev);
14 int snd_midi_event_resize_buffer(snd_midi_event_t *dev, int bufsize);
15 void snd_midi_event_free(snd_midi_event_t *dev);
16 void snd_midi_event_init(snd_midi_event_t *dev);
17 void snd_midi_event_reset_encode(snd_midi_event_t *dev);
18 void snd_midi_event_reset_decode(snd_midi_event_t *dev);
19 /* encode from byte stream - return number of written bytes if success */
20 long snd_midi_event_encode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev);
21 int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev);
22 /* decode from event to bytes - return number of written bytes if success */
23 long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev);