Path: blob/master/thirdparty/linuxbsd_headers/alsa/seq_midi_event.h
9898 views
/**1* \file include/seq_midi_event.h2* \brief Application interface library for the ALSA driver3* \author Jaroslav Kysela <[email protected]>4* \author Abramo Bagnara <[email protected]>5* \author Takashi Iwai <[email protected]>6* \date 1998-20017*8* Application interface library for the ALSA driver9*/10/*11* This library is free software; you can redistribute it and/or modify12* it under the terms of the GNU Lesser General Public License as13* published by the Free Software Foundation; either version 2.1 of14* the License, or (at your option) any later version.15*16* This program is distributed in the hope that it will be useful,17* but WITHOUT ANY WARRANTY; without even the implied warranty of18* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the19* GNU Lesser General Public License for more details.20*21* You should have received a copy of the GNU Lesser General Public22* License along with this library; if not, write to the Free Software23* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA24*25*/2627#ifndef __ALSA_SEQ_MIDI_EVENT_H28#define __ALSA_SEQ_MIDI_EVENT_H2930#ifdef __cplusplus31extern "C" {32#endif3334/**35* \defgroup MIDI_Event Sequencer event <-> MIDI byte stream coder36* \ingroup Sequencer37* Sequencer event <-> MIDI byte stream coder38* \{39*/4041/** container for sequencer midi event parsers */42typedef struct snd_midi_event snd_midi_event_t;4344int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev);45int snd_midi_event_resize_buffer(snd_midi_event_t *dev, size_t bufsize);46void snd_midi_event_free(snd_midi_event_t *dev);47void snd_midi_event_init(snd_midi_event_t *dev);48void snd_midi_event_reset_encode(snd_midi_event_t *dev);49void snd_midi_event_reset_decode(snd_midi_event_t *dev);50void snd_midi_event_no_status(snd_midi_event_t *dev, int on);51/* encode from byte stream - return number of written bytes if success */52long snd_midi_event_encode(snd_midi_event_t *dev, const unsigned char *buf, long count, snd_seq_event_t *ev);53int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev);54/* decode from event to bytes - return number of written bytes if success */55long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, const snd_seq_event_t *ev);5657/** \} */5859#ifdef __cplusplus60}61#endif6263#endif /* __ALSA_SEQ_MIDI_EVENT_H */64656667