annotate plugin/api/alsa/seq_midi_event.h @ 1008:d9e0e59a1581

When using an aggregate model to pass data to a transform, zero-pad the shorter input to the duration of the longer rather than truncating the longer. (This is better behaviour for e.g. MATCH, and in any case the code was previously truncating incorrectly and ending up with garbage data at the end.)
author Chris Cannam
date Fri, 14 Nov 2014 13:51:33 +0000
parents da6937383da8
children
rev   line source
Chris@0 1 /* DSSI ALSA compatibility library
Chris@0 2 *
Chris@0 3 * This library provides for Mac OS X the ALSA snd_seq_event_t handling
Chris@0 4 * necessary to compile and run DSSI. It was extracted from alsa-lib 1.0.8.
Chris@0 5 */
Chris@0 6
Chris@0 7 /**
Chris@0 8 * \file <alsa/seq_midi_event.h>
Chris@0 9 * \brief Application interface library for the ALSA driver
Chris@0 10 * \author Jaroslav Kysela <perex@suse.cz>
Chris@0 11 * \author Abramo Bagnara <abramo@alsa-project.org>
Chris@0 12 * \author Takashi Iwai <tiwai@suse.de>
Chris@0 13 * \date 1998-2001
Chris@0 14 *
Chris@0 15 * Application interface library for the ALSA driver
Chris@0 16 *
Chris@0 17 *
Chris@0 18 * This library is free software; you can redistribute it and/or modify
Chris@0 19 * it under the terms of the GNU Lesser General Public License as
Chris@0 20 * published by the Free Software Foundation; either version 2.1 of
Chris@0 21 * the License, or (at your option) any later version.
Chris@0 22 *
Chris@0 23 * This program is distributed in the hope that it will be useful,
Chris@0 24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@0 25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@0 26 * GNU Lesser General Public License for more details.
Chris@0 27 *
Chris@0 28 * You should have received a copy of the GNU Lesser General Public
Chris@0 29 * License along with this library; if not, write to the Free Software
Chris@0 30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Chris@0 31 *
Chris@0 32 */
Chris@0 33
Chris@0 34 #ifndef __ALSA_SEQ_MIDI_EVENT_H
Chris@0 35 #define __ALSA_SEQ_MIDI_EVENT_H
Chris@0 36
Chris@0 37 #ifdef __cplusplus
Chris@0 38 extern "C" {
Chris@0 39 #endif
Chris@0 40
Chris@0 41 /**
Chris@0 42 * \defgroup MIDI_Event Sequencer event <-> MIDI byte stream coder
Chris@0 43 * \ingroup Sequencer
Chris@0 44 * Sequencer event <-> MIDI byte stream coder
Chris@0 45 * \{
Chris@0 46 */
Chris@0 47
Chris@0 48 /** container for sequencer midi event parsers */
Chris@0 49 typedef struct snd_midi_event snd_midi_event_t;
Chris@0 50
Chris@0 51 int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev);
Chris@0 52 /* int snd_midi_event_resize_buffer(snd_midi_event_t *dev, size_t bufsize); */
Chris@0 53 void snd_midi_event_free(snd_midi_event_t *dev);
Chris@0 54 /* void snd_midi_event_init(snd_midi_event_t *dev); */
Chris@0 55 void snd_midi_event_reset_encode(snd_midi_event_t *dev);
Chris@0 56 /* void snd_midi_event_reset_decode(snd_midi_event_t *dev); */
Chris@0 57 /* void snd_midi_event_no_status(snd_midi_event_t *dev, int on); */
Chris@0 58 /* encode from byte stream - return number of written bytes if success */
Chris@0 59 long snd_midi_event_encode(snd_midi_event_t *dev, const unsigned char *buf, long count, snd_seq_event_t *ev);
Chris@0 60 int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev);
Chris@0 61 /* decode from event to bytes - return number of written bytes if success */
Chris@0 62 /* long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, const snd_seq_event_t *ev); */
Chris@0 63
Chris@0 64 /** \} */
Chris@0 65
Chris@0 66 #ifdef __cplusplus
Chris@0 67 }
Chris@0 68 #endif
Chris@0 69
Chris@0 70 #endif /* __ALSA_SEQ_MIDI_EVENT_H */
Chris@0 71