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