seq_midi_event.h
Go to the documentation of this file.
/*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* 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
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __ALSA_SEQ_MIDI_EVENT_H
#define __ALSA_SEQ_MIDI_EVENT_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct snd_midi_event snd_midi_event_t;
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);
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);
void snd_midi_event_no_status(snd_midi_event_t *dev, int on);
/* encode from byte stream - return number of written bytes if success */
long snd_midi_event_encode(snd_midi_event_t *dev, const unsigned char *buf, long count, snd_seq_event_t *ev);
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 */
long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, const snd_seq_event_t *ev);
#ifdef __cplusplus
}
#endif
#endif /* __ALSA_SEQ_MIDI_EVENT_H */
snd_midi_event_reset_encode
void snd_midi_event_reset_encode(snd_midi_event_t *dev)
Resets MIDI encode parser.
Definition: seq_midi_event.c:226
snd_seq_event_t
Definition: seq_event.h:296
snd_midi_event_encode_byte
int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev)
Encodes byte to sequencer event.
Definition: seq_midi_event.c:398
snd_midi_event_no_status
void snd_midi_event_no_status(snd_midi_event_t *dev, int on)
Enables/disables MIDI command merging.
Definition: seq_midi_event.c:200
snd_midi_event_free
void snd_midi_event_free(snd_midi_event_t *dev)
Frees a MIDI event parser.
Definition: seq_midi_event.c:181
snd_midi_event_encode
long snd_midi_event_encode(snd_midi_event_t *dev, const unsigned char *buf, long count, snd_seq_event_t *ev)
Encodes bytes to sequencer event.
Definition: seq_midi_event.c:360
snd_midi_event_reset_decode
void snd_midi_event_reset_decode(snd_midi_event_t *dev)
Resets MIDI decode parser.
Definition: seq_midi_event.c:242
snd_midi_event_init
void snd_midi_event_init(snd_midi_event_t *dev)
Resets MIDI encode/decode parsers.
Definition: seq_midi_event.c:257
snd_midi_event_resize_buffer
int snd_midi_event_resize_buffer(snd_midi_event_t *dev, size_t bufsize)
Resizes the MIDI message encoding buffer.
Definition: seq_midi_event.c:280
snd_midi_event_decode
long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, const snd_seq_event_t *ev)
Decodes sequencer event to MIDI byte stream.
Definition: seq_midi_event.c:557
snd_midi_event_t
struct snd_midi_event snd_midi_event_t
Definition: seq_midi_event.h:43
snd_midi_event_new
int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev)
Creates a MIDI event parser.
Definition: seq_midi_event.c:150