2000-11-26 22:18:25 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
|
|
|
* Sequencer event <-> MIDI byte stream coder *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
|
|
|
|
2001-04-24 13:02:58 +00:00
|
|
|
/**
|
|
|
|
* \defgroup MIDI_Event Sequencer event <-> MIDI byte stream coder
|
|
|
|
* \ingroup Sequencer
|
|
|
|
* Sequencer event <-> MIDI byte stream coder
|
|
|
|
* \{
|
|
|
|
*/
|
|
|
|
|
2001-07-11 15:48:27 +00:00
|
|
|
/** container for sequencer midi event parsers */
|
2001-02-01 07:52:30 +00:00
|
|
|
typedef struct snd_midi_event snd_midi_event_t;
|
|
|
|
|
2000-11-26 22:18:25 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2001-03-29 17:50:28 +00:00
|
|
|
int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev);
|
|
|
|
int snd_midi_event_resize_buffer(snd_midi_event_t *dev, size_t bufsize);
|
2000-11-26 22:18:25 +00:00
|
|
|
void snd_midi_event_free(snd_midi_event_t *dev);
|
|
|
|
void snd_midi_event_init(snd_midi_event_t *dev);
|
|
|
|
void snd_midi_event_reset_encode(snd_midi_event_t *dev);
|
|
|
|
void snd_midi_event_reset_decode(snd_midi_event_t *dev);
|
|
|
|
/* encode from byte stream - return number of written bytes if success */
|
|
|
|
long snd_midi_event_encode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev);
|
|
|
|
int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev);
|
|
|
|
/* decode from event to bytes - return number of written bytes if success */
|
|
|
|
long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2001-04-24 13:02:58 +00:00
|
|
|
/** \} */
|
|
|
|
|