Blame include/seq_midi_event.h

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