Jack2 1.9.6

alsa_midi.h

00001 /*
00002  * Copyright (c) 2006 Dmitry S. Baikov
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00017  */
00018 
00019 #ifndef __jack_alsa_midi_h__
00020 #define __jack_alsa_midi_h__
00021 
00022 #ifdef __cplusplus
00023 extern "C"
00024 {
00025 #else
00026 #include <stdbool.h>
00027 #endif
00028 
00029     typedef struct alsa_midi_t alsa_midi_t;
00030     struct alsa_midi_t {
00031         void (*destroy)(alsa_midi_t *amidi);
00032         int (*attach)(alsa_midi_t *amidi);
00033         int (*detach)(alsa_midi_t *amidi);
00034         int (*start)(alsa_midi_t *amidi);
00035         int (*stop)(alsa_midi_t *amidi);
00036         void (*read)(alsa_midi_t *amidi, jack_nframes_t nframes);
00037         void (*write)(alsa_midi_t *amidi, jack_nframes_t nframes);
00038     };
00039 
00040     alsa_midi_t* alsa_rawmidi_new(jack_client_t *jack);
00041     alsa_midi_t* alsa_seqmidi_new(jack_client_t *jack, const char* alsa_name);
00042 
00043 #ifdef __cplusplus
00044 } // extern "C"
00045 #endif
00046 
00047 #endif /* __jack_alsa_midi_h__ */