jpayne@69: /** jpayne@69: * \file include/seq_midi_event.h jpayne@69: * \brief Application interface library for the ALSA driver jpayne@69: * \author Jaroslav Kysela jpayne@69: * \author Abramo Bagnara jpayne@69: * \author Takashi Iwai jpayne@69: * \date 1998-2001 jpayne@69: * jpayne@69: * Application interface library for the ALSA driver jpayne@69: */ jpayne@69: /* jpayne@69: * This library is free software; you can redistribute it and/or modify jpayne@69: * it under the terms of the GNU Lesser General Public License as jpayne@69: * published by the Free Software Foundation; either version 2.1 of jpayne@69: * the License, or (at your option) any later version. jpayne@69: * jpayne@69: * This program is distributed in the hope that it will be useful, jpayne@69: * but WITHOUT ANY WARRANTY; without even the implied warranty of jpayne@69: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jpayne@69: * GNU Lesser General Public License for more details. jpayne@69: * jpayne@69: * You should have received a copy of the GNU Lesser General Public jpayne@69: * License along with this library; if not, write to the Free Software jpayne@69: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: #ifndef __ALSA_SEQ_MIDI_EVENT_H jpayne@69: #define __ALSA_SEQ_MIDI_EVENT_H jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: #endif jpayne@69: jpayne@69: /** jpayne@69: * \defgroup MIDI_Event Sequencer event <-> MIDI byte stream coder jpayne@69: * \ingroup Sequencer jpayne@69: * Sequencer event <-> MIDI byte stream coder jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: /** container for sequencer midi event parsers */ jpayne@69: typedef struct snd_midi_event snd_midi_event_t; jpayne@69: jpayne@69: int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev); jpayne@69: int snd_midi_event_resize_buffer(snd_midi_event_t *dev, size_t bufsize); jpayne@69: void snd_midi_event_free(snd_midi_event_t *dev); jpayne@69: void snd_midi_event_init(snd_midi_event_t *dev); jpayne@69: void snd_midi_event_reset_encode(snd_midi_event_t *dev); jpayne@69: void snd_midi_event_reset_decode(snd_midi_event_t *dev); jpayne@69: void snd_midi_event_no_status(snd_midi_event_t *dev, int on); jpayne@69: /* encode from byte stream - return number of written bytes if success */ jpayne@69: long snd_midi_event_encode(snd_midi_event_t *dev, const unsigned char *buf, long count, snd_seq_event_t *ev); jpayne@69: int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev); jpayne@69: /* decode from event to bytes - return number of written bytes if success */ jpayne@69: long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, const snd_seq_event_t *ev); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: #endif /* __ALSA_SEQ_MIDI_EVENT_H */ jpayne@69: