2001-09-13 11:38:32 +00:00
|
|
|
/**
|
2005-01-17 17:34:31 +00:00
|
|
|
* \file include/seq_midi_event.h
|
2001-09-13 11:38:32 +00:00
|
|
|
* \brief Application interface library for the ALSA driver
|
|
|
|
* \author Jaroslav Kysela <perex@suse.cz>
|
|
|
|
* \author Abramo Bagnara <abramo@alsa-project.org>
|
|
|
|
* \author Takashi Iwai <tiwai@suse.de>
|
|
|
|
* \date 1998-2001
|
|
|
|
*
|
|
|
|
* Application interface library for the ALSA driver
|
2005-01-17 17:34:31 +00:00
|
|
|
*/
|
|
|
|
/*
|
2001-09-13 11:38:32 +00:00
|
|
|
* This library is free software; you can redistribute it and/or modify
|
2001-12-30 09:22:54 +00:00
|
|
|
* it under the terms of the GNU Lesser General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2.1 of
|
2001-09-13 11:38:32 +00:00
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2001-12-30 09:22:54 +00:00
|
|
|
* GNU Lesser General Public License for more details.
|
2001-09-13 11:38:32 +00:00
|
|
|
*
|
2001-12-30 09:22:54 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2001-09-13 11:38:32 +00:00
|
|
|
* License along with this library; if not, write to the Free Software
|
2001-12-30 09:22:54 +00:00
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-09-13 11:38:32 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ALSA_SEQ_MIDI_EVENT_H
|
|
|
|
#define __ALSA_SEQ_MIDI_EVENT_H
|
2000-11-26 22:18:25 +00:00
|
|
|
|
2001-11-14 11:40:46 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2001-04-24 13:02:58 +00:00
|
|
|
/**
|
|
|
|
* \defgroup MIDI_Event Sequencer event <-> MIDI byte stream coder
|
|
|
|
* \ingroup Sequencer
|
|
|
|
* Sequencer event <-> MIDI byte stream coder
|
|
|
|
* \{
|
|
|
|
*/
|
|
|
|
|
2001-07-11 15:48:27 +00:00
|
|
|
/** container for sequencer midi event parsers */
|
2001-02-01 07:52:30 +00:00
|
|
|
typedef struct snd_midi_event snd_midi_event_t;
|
|
|
|
|
2001-03-29 17:50:28 +00:00
|
|
|
int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev);
|
|
|
|
int snd_midi_event_resize_buffer(snd_midi_event_t *dev, size_t bufsize);
|
2000-11-26 22:18:25 +00:00
|
|
|
void snd_midi_event_free(snd_midi_event_t *dev);
|
|
|
|
void snd_midi_event_init(snd_midi_event_t *dev);
|
|
|
|
void snd_midi_event_reset_encode(snd_midi_event_t *dev);
|
|
|
|
void snd_midi_event_reset_decode(snd_midi_event_t *dev);
|
2002-04-19 17:34:57 +00:00
|
|
|
void snd_midi_event_no_status(snd_midi_event_t *dev, int on);
|
2000-11-26 22:18:25 +00:00
|
|
|
/* encode from byte stream - return number of written bytes if success */
|
2003-07-29 17:05:31 +00:00
|
|
|
long snd_midi_event_encode(snd_midi_event_t *dev, const unsigned char *buf, long count, snd_seq_event_t *ev);
|
2000-11-26 22:18:25 +00:00
|
|
|
int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev);
|
|
|
|
/* decode from event to bytes - return number of written bytes if success */
|
2003-07-29 17:05:31 +00:00
|
|
|
long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, const snd_seq_event_t *ev);
|
2000-11-26 22:18:25 +00:00
|
|
|
|
2001-11-14 11:40:46 +00:00
|
|
|
/** \} */
|
|
|
|
|
2000-11-26 22:18:25 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2001-09-13 11:38:32 +00:00
|
|
|
#endif /* __ALSA_SEQ_MIDI_EVENT_H */
|
|
|
|
|