jpayne@69
|
1 /**
|
jpayne@69
|
2 * \file include/seq_midi_event.h
|
jpayne@69
|
3 * \brief Application interface library for the ALSA driver
|
jpayne@69
|
4 * \author Jaroslav Kysela <perex@perex.cz>
|
jpayne@69
|
5 * \author Abramo Bagnara <abramo@alsa-project.org>
|
jpayne@69
|
6 * \author Takashi Iwai <tiwai@suse.de>
|
jpayne@69
|
7 * \date 1998-2001
|
jpayne@69
|
8 *
|
jpayne@69
|
9 * Application interface library for the ALSA driver
|
jpayne@69
|
10 */
|
jpayne@69
|
11 /*
|
jpayne@69
|
12 * This library is free software; you can redistribute it and/or modify
|
jpayne@69
|
13 * it under the terms of the GNU Lesser General Public License as
|
jpayne@69
|
14 * published by the Free Software Foundation; either version 2.1 of
|
jpayne@69
|
15 * the License, or (at your option) any later version.
|
jpayne@69
|
16 *
|
jpayne@69
|
17 * This program is distributed in the hope that it will be useful,
|
jpayne@69
|
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
jpayne@69
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
jpayne@69
|
20 * GNU Lesser General Public License for more details.
|
jpayne@69
|
21 *
|
jpayne@69
|
22 * You should have received a copy of the GNU Lesser General Public
|
jpayne@69
|
23 * License along with this library; if not, write to the Free Software
|
jpayne@69
|
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
jpayne@69
|
25 *
|
jpayne@69
|
26 */
|
jpayne@69
|
27
|
jpayne@69
|
28 #ifndef __ALSA_SEQ_MIDI_EVENT_H
|
jpayne@69
|
29 #define __ALSA_SEQ_MIDI_EVENT_H
|
jpayne@69
|
30
|
jpayne@69
|
31 #ifdef __cplusplus
|
jpayne@69
|
32 extern "C" {
|
jpayne@69
|
33 #endif
|
jpayne@69
|
34
|
jpayne@69
|
35 /**
|
jpayne@69
|
36 * \defgroup MIDI_Event Sequencer event <-> MIDI byte stream coder
|
jpayne@69
|
37 * \ingroup Sequencer
|
jpayne@69
|
38 * Sequencer event <-> MIDI byte stream coder
|
jpayne@69
|
39 * \{
|
jpayne@69
|
40 */
|
jpayne@69
|
41
|
jpayne@69
|
42 /** container for sequencer midi event parsers */
|
jpayne@69
|
43 typedef struct snd_midi_event snd_midi_event_t;
|
jpayne@69
|
44
|
jpayne@69
|
45 int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev);
|
jpayne@69
|
46 int snd_midi_event_resize_buffer(snd_midi_event_t *dev, size_t bufsize);
|
jpayne@69
|
47 void snd_midi_event_free(snd_midi_event_t *dev);
|
jpayne@69
|
48 void snd_midi_event_init(snd_midi_event_t *dev);
|
jpayne@69
|
49 void snd_midi_event_reset_encode(snd_midi_event_t *dev);
|
jpayne@69
|
50 void snd_midi_event_reset_decode(snd_midi_event_t *dev);
|
jpayne@69
|
51 void snd_midi_event_no_status(snd_midi_event_t *dev, int on);
|
jpayne@69
|
52 /* encode from byte stream - return number of written bytes if success */
|
jpayne@69
|
53 long snd_midi_event_encode(snd_midi_event_t *dev, const unsigned char *buf, long count, snd_seq_event_t *ev);
|
jpayne@69
|
54 int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev);
|
jpayne@69
|
55 /* decode from event to bytes - return number of written bytes if success */
|
jpayne@69
|
56 long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, const snd_seq_event_t *ev);
|
jpayne@69
|
57
|
jpayne@69
|
58 /** \} */
|
jpayne@69
|
59
|
jpayne@69
|
60 #ifdef __cplusplus
|
jpayne@69
|
61 }
|
jpayne@69
|
62 #endif
|
jpayne@69
|
63
|
jpayne@69
|
64 #endif /* __ALSA_SEQ_MIDI_EVENT_H */
|
jpayne@69
|
65
|