ALSA project - the C library reference
|
00001 00011 /* 00012 * This library is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License as 00014 * published by the Free Software Foundation; either version 2.1 of 00015 * the License, or (at your option) any later version. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU Lesser General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU Lesser General Public 00023 * License along with this library; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 */ 00027 00028 #ifndef __ALSA_SEQ_MIDI_EVENT_H 00029 #define __ALSA_SEQ_MIDI_EVENT_H 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00043 typedef struct snd_midi_event snd_midi_event_t; 00044 00045 int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev); 00046 int snd_midi_event_resize_buffer(snd_midi_event_t *dev, size_t bufsize); 00047 void snd_midi_event_free(snd_midi_event_t *dev); 00048 void snd_midi_event_init(snd_midi_event_t *dev); 00049 void snd_midi_event_reset_encode(snd_midi_event_t *dev); 00050 void snd_midi_event_reset_decode(snd_midi_event_t *dev); 00051 void snd_midi_event_no_status(snd_midi_event_t *dev, int on); 00052 /* encode from byte stream - return number of written bytes if success */ 00053 long snd_midi_event_encode(snd_midi_event_t *dev, const unsigned char *buf, long count, snd_seq_event_t *ev); 00054 int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev); 00055 /* decode from event to bytes - return number of written bytes if success */ 00056 long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, const snd_seq_event_t *ev); 00057 00060 #ifdef __cplusplus 00061 } 00062 #endif 00063 00064 #endif /* __ALSA_SEQ_MIDI_EVENT_H */ 00065