1 /* FluidSynth - A Software Synthesizer
2  *
3  * Copyright (C) 2003  Peter Hanappe and others.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public License
7  * as published by the Free Software Foundation; either version 2.1 of
8  * the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free
17  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  * 02110-1301, USA
19  */
20 
21 #ifndef _FLUID_MDRIVER_H
22 #define _FLUID_MDRIVER_H
23 
24 #include "fluid_sys.h"
25 
26 /*
27  * fluid_midi_driver_t
28  */
29 
30 typedef struct _fluid_mdriver_definition_t fluid_mdriver_definition_t;
31 
32 struct _fluid_midi_driver_t
33 {
34     const fluid_mdriver_definition_t *define;
35     handle_midi_event_func_t handler;
36     void *data;
37 };
38 
39 void fluid_midi_driver_settings(fluid_settings_t *settings);
40 
41 /* ALSA */
42 #if ALSA_SUPPORT
43 fluid_midi_driver_t *new_fluid_alsa_rawmidi_driver(fluid_settings_t *settings,
44         handle_midi_event_func_t handler,
45         void *event_handler_data);
46 void delete_fluid_alsa_rawmidi_driver(fluid_midi_driver_t *p);
47 void fluid_alsa_rawmidi_driver_settings(fluid_settings_t *settings);
48 
49 fluid_midi_driver_t *new_fluid_alsa_seq_driver(fluid_settings_t *settings,
50         handle_midi_event_func_t handler,
51         void *event_handler_data);
52 void delete_fluid_alsa_seq_driver(fluid_midi_driver_t *p);
53 void fluid_alsa_seq_driver_settings(fluid_settings_t *settings);
54 #endif
55 
56 /* SNDIO */
57 #if SNDIO_SUPPORT
58 void fluid_sndio_midi_driver_settings(fluid_settings_t *settings);
59 fluid_midi_driver_t *new_fluid_sndio_midi_driver(fluid_settings_t *settings,
60         handle_midi_event_func_t handler,
61         void *data);
62 void delete_fluid_sndio_midi_driver(fluid_midi_driver_t *p);
63 #endif
64 
65 /* JACK */
66 #if JACK_SUPPORT
67 void fluid_jack_midi_driver_settings(fluid_settings_t *settings);
68 fluid_midi_driver_t *new_fluid_jack_midi_driver(fluid_settings_t *settings,
69         handle_midi_event_func_t handler,
70         void *data);
71 void delete_fluid_jack_midi_driver(fluid_midi_driver_t *p);
72 #endif
73 
74 /* OSS */
75 #if OSS_SUPPORT
76 fluid_midi_driver_t *new_fluid_oss_midi_driver(fluid_settings_t *settings,
77         handle_midi_event_func_t handler,
78         void *event_handler_data);
79 void delete_fluid_oss_midi_driver(fluid_midi_driver_t *p);
80 void fluid_oss_midi_driver_settings(fluid_settings_t *settings);
81 #endif
82 
83 /* Windows MIDI service */
84 #if WINMIDI_SUPPORT
85 fluid_midi_driver_t *new_fluid_winmidi_driver(fluid_settings_t *settings,
86         handle_midi_event_func_t handler,
87         void *event_handler_data);
88 void delete_fluid_winmidi_driver(fluid_midi_driver_t *p);
89 void fluid_winmidi_midi_driver_settings(fluid_settings_t *settings);
90 #endif
91 
92 /* definitions for the MidiShare driver */
93 #if MIDISHARE_SUPPORT
94 fluid_midi_driver_t *new_fluid_midishare_midi_driver(fluid_settings_t *settings,
95         handle_midi_event_func_t handler,
96         void *event_handler_data);
97 void delete_fluid_midishare_midi_driver(fluid_midi_driver_t *p);
98 #endif
99 
100 /* definitions for the CoreMidi driver */
101 #if COREMIDI_SUPPORT
102 fluid_midi_driver_t *new_fluid_coremidi_driver(fluid_settings_t *settings,
103         handle_midi_event_func_t handler,
104         void *event_handler_data);
105 void delete_fluid_coremidi_driver(fluid_midi_driver_t *p);
106 void fluid_coremidi_driver_settings(fluid_settings_t *settings);
107 #endif
108 
109 #endif  /* _FLUID_AUDRIVER_H */
110