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