fluidlite_sys/bindings/
x86_64-linux-gnu.rs

1/* automatically generated by rust-bindgen 0.59.1 */
2
3pub const SEEK_SET: u32 = 0;
4pub const SEEK_CUR: u32 = 1;
5pub const SEEK_END: u32 = 2;
6pub const FLUID_HINT_BOUNDED_BELOW: u32 = 1;
7pub const FLUID_HINT_BOUNDED_ABOVE: u32 = 2;
8pub const FLUID_HINT_TOGGLED: u32 = 4;
9pub const FLUID_HINT_SAMPLE_RATE: u32 = 8;
10pub const FLUID_HINT_LOGARITHMIC: u32 = 16;
11pub const FLUID_HINT_INTEGER: u32 = 32;
12pub const FLUID_HINT_FILENAME: u32 = 1;
13pub const FLUID_HINT_OPTIONLIST: u32 = 2;
14pub const FLUID_REVERB_DEFAULT_ROOMSIZE: f64 = 0.2;
15pub const FLUID_REVERB_DEFAULT_DAMP: f64 = 0.0;
16pub const FLUID_REVERB_DEFAULT_WIDTH: f64 = 0.5;
17pub const FLUID_REVERB_DEFAULT_LEVEL: f64 = 0.9;
18pub const FLUID_CHORUS_DEFAULT_N: u32 = 3;
19pub const FLUID_CHORUS_DEFAULT_LEVEL: f64 = 2.0;
20pub const FLUID_CHORUS_DEFAULT_SPEED: f64 = 0.3;
21pub const FLUID_CHORUS_DEFAULT_DEPTH: f64 = 8.0;
22pub const FLUID_SAMPLETYPE_MONO: u32 = 1;
23pub const FLUID_SAMPLETYPE_RIGHT: u32 = 2;
24pub const FLUID_SAMPLETYPE_LEFT: u32 = 4;
25pub const FLUID_SAMPLETYPE_LINKED: u32 = 8;
26pub const FLUID_SAMPLETYPE_OGG_VORBIS: u32 = 16;
27pub const FLUID_SAMPLETYPE_OGG_VORBIS_UNPACKED: u32 = 32;
28pub const FLUID_SAMPLETYPE_ROM: u32 = 32768;
29pub const FLUID_NUM_MOD: u32 = 64;
30#[repr(C)]
31#[derive(Debug, Copy, Clone)]
32pub struct _fluid_hashtable_t {
33    _unused: [u8; 0],
34}
35pub type fluid_settings_t = _fluid_hashtable_t;
36#[repr(C)]
37#[derive(Debug, Copy, Clone)]
38pub struct _fluid_synth_t {
39    _unused: [u8; 0],
40}
41pub type fluid_synth_t = _fluid_synth_t;
42#[repr(C)]
43#[derive(Debug, Copy, Clone)]
44pub struct _fluid_voice_t {
45    _unused: [u8; 0],
46}
47pub type fluid_voice_t = _fluid_voice_t;
48pub type fluid_sfloader_t = _fluid_sfloader_t;
49pub type fluid_sfont_t = _fluid_sfont_t;
50pub type fluid_preset_t = _fluid_preset_t;
51pub type fluid_sample_t = _fluid_sample_t;
52pub type fluid_mod_t = _fluid_mod_t;
53#[repr(C)]
54#[derive(Debug, Copy, Clone)]
55pub struct _fluid_audio_driver_t {
56    _unused: [u8; 0],
57}
58pub type fluid_audio_driver_t = _fluid_audio_driver_t;
59#[repr(C)]
60#[derive(Debug, Copy, Clone)]
61pub struct _fluid_player_t {
62    _unused: [u8; 0],
63}
64pub type fluid_player_t = _fluid_player_t;
65#[repr(C)]
66#[derive(Debug, Copy, Clone)]
67pub struct _fluid_midi_event_t {
68    _unused: [u8; 0],
69}
70pub type fluid_midi_event_t = _fluid_midi_event_t;
71#[repr(C)]
72#[derive(Debug, Copy, Clone)]
73pub struct _fluid_midi_driver_t {
74    _unused: [u8; 0],
75}
76pub type fluid_midi_driver_t = _fluid_midi_driver_t;
77#[repr(C)]
78#[derive(Debug, Copy, Clone)]
79pub struct _fluid_midi_router_t {
80    _unused: [u8; 0],
81}
82pub type fluid_midi_router_t = _fluid_midi_router_t;
83#[repr(C)]
84#[derive(Debug, Copy, Clone)]
85pub struct _fluid_midi_router_rule_t {
86    _unused: [u8; 0],
87}
88pub type fluid_midi_router_rule_t = _fluid_midi_router_rule_t;
89pub type fluid_cmd_handler_t = _fluid_hashtable_t;
90#[repr(C)]
91#[derive(Debug, Copy, Clone)]
92pub struct _fluid_shell_t {
93    _unused: [u8; 0],
94}
95pub type fluid_shell_t = _fluid_shell_t;
96#[repr(C)]
97#[derive(Debug, Copy, Clone)]
98pub struct _fluid_server_t {
99    _unused: [u8; 0],
100}
101pub type fluid_server_t = _fluid_server_t;
102#[repr(C)]
103#[derive(Debug, Copy, Clone)]
104pub struct _fluid_event_t {
105    _unused: [u8; 0],
106}
107pub type fluid_event_t = _fluid_event_t;
108#[repr(C)]
109#[derive(Debug, Copy, Clone)]
110pub struct _fluid_sequencer_t {
111    _unused: [u8; 0],
112}
113pub type fluid_sequencer_t = _fluid_sequencer_t;
114#[repr(C)]
115#[derive(Debug, Copy, Clone)]
116pub struct _fluid_ramsfont_t {
117    _unused: [u8; 0],
118}
119pub type fluid_ramsfont_t = _fluid_ramsfont_t;
120#[repr(C)]
121#[derive(Debug, Copy, Clone)]
122pub struct _fluid_rampreset_t {
123    _unused: [u8; 0],
124}
125pub type fluid_rampreset_t = _fluid_rampreset_t;
126pub type fluid_fileapi_t = _fluid_fileapi_t;
127pub type fluid_istream_t = ::std::os::raw::c_int;
128pub type fluid_ostream_t = ::std::os::raw::c_int;
129pub const fluid_types_enum_FLUID_NO_TYPE: fluid_types_enum = -1;
130pub const fluid_types_enum_FLUID_NUM_TYPE: fluid_types_enum = 0;
131pub const fluid_types_enum_FLUID_INT_TYPE: fluid_types_enum = 1;
132pub const fluid_types_enum_FLUID_STR_TYPE: fluid_types_enum = 2;
133pub const fluid_types_enum_FLUID_SET_TYPE: fluid_types_enum = 3;
134pub type fluid_types_enum = ::std::os::raw::c_int;
135extern "C" {
136    pub fn new_fluid_settings() -> *mut fluid_settings_t;
137}
138extern "C" {
139    pub fn delete_fluid_settings(settings: *mut fluid_settings_t);
140}
141extern "C" {
142    pub fn fluid_settings_get_type(
143        settings: *mut fluid_settings_t,
144        name: *const ::std::os::raw::c_char,
145    ) -> ::std::os::raw::c_int;
146}
147extern "C" {
148    pub fn fluid_settings_get_hints(
149        settings: *mut fluid_settings_t,
150        name: *const ::std::os::raw::c_char,
151    ) -> ::std::os::raw::c_int;
152}
153extern "C" {
154    #[doc = " Returns whether the setting is changeable in real-time."]
155    pub fn fluid_settings_is_realtime(
156        settings: *mut fluid_settings_t,
157        name: *const ::std::os::raw::c_char,
158    ) -> ::std::os::raw::c_int;
159}
160extern "C" {
161    #[doc = " returns 1 if the value has been set, 0 otherwise"]
162    pub fn fluid_settings_setstr(
163        settings: *mut fluid_settings_t,
164        name: *const ::std::os::raw::c_char,
165        str_: *const ::std::os::raw::c_char,
166    ) -> ::std::os::raw::c_int;
167}
168extern "C" {
169    #[doc = "Get the value of a string setting. If the value does not exists,"]
170    #[doc = "'str' is set to NULL. Otherwise, 'str' will point to the"]
171    #[doc = "value. The application does not own the returned value. Instead,"]
172    #[doc = "the application should make a copy of the value if it needs it"]
173    #[doc = "later."]
174    #[doc = ""]
175    #[doc = "\\returns 1 if the value exists, 0 otherwise"]
176    pub fn fluid_settings_getstr(
177        settings: *mut fluid_settings_t,
178        name: *const ::std::os::raw::c_char,
179        str_: *mut *mut ::std::os::raw::c_char,
180    ) -> ::std::os::raw::c_int;
181}
182extern "C" {
183    #[doc = " Get the default value of a string setting."]
184    pub fn fluid_settings_getstr_default(
185        settings: *mut fluid_settings_t,
186        name: *const ::std::os::raw::c_char,
187    ) -> *mut ::std::os::raw::c_char;
188}
189extern "C" {
190    #[doc = " Get the value of a numeric setting."]
191    #[doc = ""]
192    #[doc = "\\returns 1 if the value exists and is equal to 'value', 0"]
193    #[doc = "otherwise"]
194    pub fn fluid_settings_str_equal(
195        settings: *mut fluid_settings_t,
196        name: *const ::std::os::raw::c_char,
197        value: *mut ::std::os::raw::c_char,
198    ) -> ::std::os::raw::c_int;
199}
200extern "C" {
201    #[doc = " returns 1 if the value has been set, 0 otherwise"]
202    pub fn fluid_settings_setnum(
203        settings: *mut fluid_settings_t,
204        name: *const ::std::os::raw::c_char,
205        val: f64,
206    ) -> ::std::os::raw::c_int;
207}
208extern "C" {
209    #[doc = " returns 1 if the value exists, 0 otherwise"]
210    pub fn fluid_settings_getnum(
211        settings: *mut fluid_settings_t,
212        name: *const ::std::os::raw::c_char,
213        val: *mut f64,
214    ) -> ::std::os::raw::c_int;
215}
216extern "C" {
217    #[doc = " Get the default value of a string setting."]
218    pub fn fluid_settings_getnum_default(
219        settings: *mut fluid_settings_t,
220        name: *const ::std::os::raw::c_char,
221    ) -> f64;
222}
223extern "C" {
224    #[doc = " Get the range of values of a numeric settings."]
225    pub fn fluid_settings_getnum_range(
226        settings: *mut fluid_settings_t,
227        name: *const ::std::os::raw::c_char,
228        min: *mut f64,
229        max: *mut f64,
230    );
231}
232extern "C" {
233    #[doc = " returns 1 if the value has been set, 0 otherwise"]
234    pub fn fluid_settings_setint(
235        settings: *mut fluid_settings_t,
236        name: *const ::std::os::raw::c_char,
237        val: ::std::os::raw::c_int,
238    ) -> ::std::os::raw::c_int;
239}
240extern "C" {
241    #[doc = " returns 1 if the value exists, 0 otherwise"]
242    pub fn fluid_settings_getint(
243        settings: *mut fluid_settings_t,
244        name: *const ::std::os::raw::c_char,
245        val: *mut ::std::os::raw::c_int,
246    ) -> ::std::os::raw::c_int;
247}
248extern "C" {
249    #[doc = " Get the default value of a string setting."]
250    pub fn fluid_settings_getint_default(
251        settings: *mut fluid_settings_t,
252        name: *const ::std::os::raw::c_char,
253    ) -> ::std::os::raw::c_int;
254}
255extern "C" {
256    #[doc = " Get the range of values of a numeric settings."]
257    pub fn fluid_settings_getint_range(
258        settings: *mut fluid_settings_t,
259        name: *const ::std::os::raw::c_char,
260        min: *mut ::std::os::raw::c_int,
261        max: *mut ::std::os::raw::c_int,
262    );
263}
264extern "C" {
265    #[doc = " Creates a new synthesizer object."]
266    #[doc = ""]
267    #[doc = "  Creates a new synthesizer object. As soon as the synthesizer is"]
268    #[doc = "  created, it will start playing."]
269    #[doc = ""]
270    #[doc = " \\param settings a pointer to a settings structure"]
271    #[doc = " \\return a newly allocated synthesizer or NULL in case of error"]
272    pub fn new_fluid_synth(settings: *mut fluid_settings_t) -> *mut fluid_synth_t;
273}
274extern "C" {
275    pub fn fluid_synth_set_sample_rate(synth: *mut fluid_synth_t, sample_rate: f32);
276}
277extern "C" {
278    #[doc = " Deletes the synthesizer previously created with new_fluid_synth."]
279    #[doc = ""]
280    #[doc = " \\param synth the synthesizer object"]
281    #[doc = " \\return 0 if no error occured, -1 otherwise"]
282    pub fn delete_fluid_synth(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
283}
284extern "C" {
285    #[doc = " Get a reference to the settings of the synthesizer."]
286    #[doc = ""]
287    #[doc = " \\param synth the synthesizer object"]
288    #[doc = " \\return pointer to the settings"]
289    pub fn fluid_synth_get_settings(synth: *mut fluid_synth_t) -> *mut fluid_settings_t;
290}
291extern "C" {
292    #[doc = " Send a noteon message. Returns 0 if no error occurred, -1 otherwise."]
293    pub fn fluid_synth_noteon(
294        synth: *mut fluid_synth_t,
295        chan: ::std::os::raw::c_int,
296        key: ::std::os::raw::c_int,
297        vel: ::std::os::raw::c_int,
298    ) -> ::std::os::raw::c_int;
299}
300extern "C" {
301    #[doc = " Send a noteoff message. Returns 0 if no error occurred, -1 otherwise."]
302    pub fn fluid_synth_noteoff(
303        synth: *mut fluid_synth_t,
304        chan: ::std::os::raw::c_int,
305        key: ::std::os::raw::c_int,
306    ) -> ::std::os::raw::c_int;
307}
308extern "C" {
309    #[doc = " Send a control change message. Returns 0 if no error occurred, -1 otherwise."]
310    pub fn fluid_synth_cc(
311        synth: *mut fluid_synth_t,
312        chan: ::std::os::raw::c_int,
313        ctrl: ::std::os::raw::c_int,
314        val: ::std::os::raw::c_int,
315    ) -> ::std::os::raw::c_int;
316}
317extern "C" {
318    #[doc = " Get a control value. Returns 0 if no error occurred, -1 otherwise."]
319    pub fn fluid_synth_get_cc(
320        synth: *mut fluid_synth_t,
321        chan: ::std::os::raw::c_int,
322        ctrl: ::std::os::raw::c_int,
323        pval: *mut ::std::os::raw::c_int,
324    ) -> ::std::os::raw::c_int;
325}
326extern "C" {
327    #[doc = " Send a pitch bend message. Returns 0 if no error occurred, -1 otherwise."]
328    pub fn fluid_synth_pitch_bend(
329        synth: *mut fluid_synth_t,
330        chan: ::std::os::raw::c_int,
331        val: ::std::os::raw::c_int,
332    ) -> ::std::os::raw::c_int;
333}
334extern "C" {
335    #[doc = " Get the pitch bend value. Returns 0 if no error occurred, -1 otherwise."]
336    pub fn fluid_synth_get_pitch_bend(
337        synth: *mut fluid_synth_t,
338        chan: ::std::os::raw::c_int,
339        ppitch_bend: *mut ::std::os::raw::c_int,
340    ) -> ::std::os::raw::c_int;
341}
342extern "C" {
343    #[doc = " Set the pitch wheel sensitivity. Returns 0 if no error occurred, -1 otherwise."]
344    pub fn fluid_synth_pitch_wheel_sens(
345        synth: *mut fluid_synth_t,
346        chan: ::std::os::raw::c_int,
347        val: ::std::os::raw::c_int,
348    ) -> ::std::os::raw::c_int;
349}
350extern "C" {
351    #[doc = " Get the pitch wheel sensitivity. Returns 0 if no error occurred, -1 otherwise."]
352    pub fn fluid_synth_get_pitch_wheel_sens(
353        synth: *mut fluid_synth_t,
354        chan: ::std::os::raw::c_int,
355        pval: *mut ::std::os::raw::c_int,
356    ) -> ::std::os::raw::c_int;
357}
358extern "C" {
359    #[doc = " Send a program change message. Returns 0 if no error occurred, -1 otherwise."]
360    pub fn fluid_synth_program_change(
361        synth: *mut fluid_synth_t,
362        chan: ::std::os::raw::c_int,
363        program: ::std::os::raw::c_int,
364    ) -> ::std::os::raw::c_int;
365}
366extern "C" {
367    pub fn fluid_synth_channel_pressure(
368        synth: *mut fluid_synth_t,
369        chan: ::std::os::raw::c_int,
370        val: ::std::os::raw::c_int,
371    ) -> ::std::os::raw::c_int;
372}
373extern "C" {
374    pub fn fluid_synth_key_pressure(
375        synth: *mut fluid_synth_t,
376        chan: ::std::os::raw::c_int,
377        key: ::std::os::raw::c_int,
378        val: ::std::os::raw::c_int,
379    ) -> ::std::os::raw::c_int;
380}
381extern "C" {
382    pub fn fluid_synth_sysex(
383        synth: *mut fluid_synth_t,
384        data: *const ::std::os::raw::c_char,
385        len: ::std::os::raw::c_int,
386        response: *mut ::std::os::raw::c_char,
387        response_len: *mut ::std::os::raw::c_int,
388        handled: *mut ::std::os::raw::c_int,
389        dryrun: ::std::os::raw::c_int,
390    ) -> ::std::os::raw::c_int;
391}
392extern "C" {
393    #[doc = " Select a bank. Returns 0 if no error occurred, -1 otherwise."]
394    pub fn fluid_synth_bank_select(
395        synth: *mut fluid_synth_t,
396        chan: ::std::os::raw::c_int,
397        bank: ::std::os::raw::c_uint,
398    ) -> ::std::os::raw::c_int;
399}
400extern "C" {
401    #[doc = " Select a sfont. Returns 0 if no error occurred, -1 otherwise."]
402    pub fn fluid_synth_sfont_select(
403        synth: *mut fluid_synth_t,
404        chan: ::std::os::raw::c_int,
405        sfont_id: ::std::os::raw::c_uint,
406    ) -> ::std::os::raw::c_int;
407}
408extern "C" {
409    #[doc = " Select a preset for a channel. The preset is specified by the"]
410    #[doc = "SoundFont ID, the bank number, and the preset number. This"]
411    #[doc = "allows any preset to be selected and circumvents preset masking"]
412    #[doc = "due to previously loaded SoundFonts on the SoundFont stack."]
413    #[doc = ""]
414    #[doc = "\\param synth The synthesizer"]
415    #[doc = "\\param chan The channel on which to set the preset"]
416    #[doc = "\\param sfont_id The ID of the SoundFont"]
417    #[doc = "\\param bank_num The bank number"]
418    #[doc = "\\param preset_num The preset number"]
419    #[doc = "\\return 0 if no errors occured, -1 otherwise"]
420    pub fn fluid_synth_program_select(
421        synth: *mut fluid_synth_t,
422        chan: ::std::os::raw::c_int,
423        sfont_id: ::std::os::raw::c_uint,
424        bank_num: ::std::os::raw::c_uint,
425        preset_num: ::std::os::raw::c_uint,
426    ) -> ::std::os::raw::c_int;
427}
428extern "C" {
429    #[doc = " Returns the program, bank, and SoundFont number of the preset on"]
430    #[doc = "a given channel. Returns 0 if no error occurred, -1 otherwise."]
431    pub fn fluid_synth_get_program(
432        synth: *mut fluid_synth_t,
433        chan: ::std::os::raw::c_int,
434        sfont_id: *mut ::std::os::raw::c_uint,
435        bank_num: *mut ::std::os::raw::c_uint,
436        preset_num: *mut ::std::os::raw::c_uint,
437    ) -> ::std::os::raw::c_int;
438}
439extern "C" {
440    #[doc = " Send a bank select and a program change to every channel to"]
441    #[doc = "  reinitialize the preset of the channel. This function is useful"]
442    #[doc = "  mainly after a SoundFont has been loaded, unloaded or"]
443    #[doc = "  reloaded. . Returns 0 if no error occurred, -1 otherwise."]
444    pub fn fluid_synth_program_reset(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
445}
446extern "C" {
447    #[doc = " Send a reset. A reset turns all the notes off and resets the"]
448    #[doc = "controller values."]
449    pub fn fluid_synth_system_reset(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
450}
451extern "C" {
452    #[doc = " Create and start voices using a preset. The id passed as"]
453    #[doc = " argument will be used as the voice group id."]
454    pub fn fluid_synth_start(
455        synth: *mut fluid_synth_t,
456        id: ::std::os::raw::c_uint,
457        preset: *mut fluid_preset_t,
458        audio_chan: ::std::os::raw::c_int,
459        midi_chan: ::std::os::raw::c_int,
460        key: ::std::os::raw::c_int,
461        vel: ::std::os::raw::c_int,
462    ) -> ::std::os::raw::c_int;
463}
464extern "C" {
465    #[doc = " Stop the voices in the voice group defined by id."]
466    pub fn fluid_synth_stop(
467        synth: *mut fluid_synth_t,
468        id: ::std::os::raw::c_uint,
469    ) -> ::std::os::raw::c_int;
470}
471extern "C" {
472    #[doc = " Set an optional function callback each time a preset has finished loading."]
473    #[doc = "This can be useful when calling fluid_synth_sfload asynchronously."]
474    #[doc = "The function must be formatted like this:"]
475    #[doc = "void my_callback_function(int bank, int num, char* name)"]
476    #[doc = ""]
477    #[doc = "\\param callback Pointer to the function"]
478    pub fn fluid_synth_set_preset_callback(callback: *mut ::std::os::raw::c_void);
479}
480extern "C" {
481    #[doc = " Loads a SoundFont file and creates a new SoundFont. The newly"]
482    #[doc = "loaded SoundFont will be put on top of the SoundFont"]
483    #[doc = "stack. Presets are searched starting from the SoundFont on the"]
484    #[doc = "top of the stack, working the way down the stack until a preset"]
485    #[doc = "is found."]
486    #[doc = ""]
487    #[doc = "\\param synth The synthesizer object"]
488    #[doc = "\\param filename The file name"]
489    #[doc = "\\param reset_presets If non-zero, the presets on the channels will be reset"]
490    #[doc = "\\returns The ID of the loaded SoundFont, or -1 in case of error"]
491    pub fn fluid_synth_sfload(
492        synth: *mut fluid_synth_t,
493        filename: *const ::std::os::raw::c_char,
494        reset_presets: ::std::os::raw::c_int,
495    ) -> ::std::os::raw::c_int;
496}
497extern "C" {
498    #[doc = " Reload a SoundFont. The reloaded SoundFont retains its ID and"]
499    #[doc = "index on the stack."]
500    #[doc = ""]
501    #[doc = "\\param synth The synthesizer object"]
502    #[doc = "\\param id The id of the SoundFont"]
503    #[doc = "\\returns The ID of the loaded SoundFont, or -1 in case of error"]
504    pub fn fluid_synth_sfreload(
505        synth: *mut fluid_synth_t,
506        id: ::std::os::raw::c_uint,
507    ) -> ::std::os::raw::c_int;
508}
509extern "C" {
510    #[doc = " Removes a SoundFont from the stack and deallocates it."]
511    #[doc = ""]
512    #[doc = "\\param synth The synthesizer object"]
513    #[doc = "\\param id The id of the SoundFont"]
514    #[doc = "\\param reset_presets If TRUE then presets will be reset for all channels"]
515    #[doc = "\\returns 0 if no error, -1 otherwise"]
516    pub fn fluid_synth_sfunload(
517        synth: *mut fluid_synth_t,
518        id: ::std::os::raw::c_uint,
519        reset_presets: ::std::os::raw::c_int,
520    ) -> ::std::os::raw::c_int;
521}
522extern "C" {
523    #[doc = " Add a SoundFont. The SoundFont will be put on top of"]
524    #[doc = "the SoundFont stack."]
525    #[doc = ""]
526    #[doc = "\\param synth The synthesizer object"]
527    #[doc = "\\param sfont The SoundFont"]
528    #[doc = "\\returns The ID of the loaded SoundFont, or -1 in case of error"]
529    pub fn fluid_synth_add_sfont(
530        synth: *mut fluid_synth_t,
531        sfont: *mut fluid_sfont_t,
532    ) -> ::std::os::raw::c_int;
533}
534extern "C" {
535    #[doc = " Remove a SoundFont that was previously added using"]
536    #[doc = "  fluid_synth_add_sfont(). The synthesizer does not delete the"]
537    #[doc = "  SoundFont; this is responsability of the caller."]
538    #[doc = ""]
539    #[doc = "\\param synth The synthesizer object"]
540    #[doc = "\\param sfont The SoundFont"]
541    pub fn fluid_synth_remove_sfont(synth: *mut fluid_synth_t, sfont: *mut fluid_sfont_t);
542}
543extern "C" {
544    #[doc = " Count the number of loaded SoundFonts."]
545    #[doc = ""]
546    #[doc = "\\param synth The synthesizer object"]
547    #[doc = "\\returns The number of loaded SoundFonts"]
548    pub fn fluid_synth_sfcount(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
549}
550extern "C" {
551    #[doc = " Get a SoundFont. The SoundFont is specified by its index on the"]
552    #[doc = "stack. The top of the stack has index zero."]
553    #[doc = ""]
554    #[doc = "\\param synth The synthesizer object"]
555    #[doc = "\\param num The number of the SoundFont (0 <= num < sfcount)"]
556    #[doc = "\\returns A pointer to the SoundFont"]
557    pub fn fluid_synth_get_sfont(
558        synth: *mut fluid_synth_t,
559        num: ::std::os::raw::c_uint,
560    ) -> *mut fluid_sfont_t;
561}
562extern "C" {
563    #[doc = " Get a SoundFont. The SoundFont is specified by its ID."]
564    #[doc = ""]
565    #[doc = "\\param synth The synthesizer object"]
566    #[doc = "\\param id The id of the sfont"]
567    #[doc = "\\returns A pointer to the SoundFont"]
568    pub fn fluid_synth_get_sfont_by_id(
569        synth: *mut fluid_synth_t,
570        id: ::std::os::raw::c_uint,
571    ) -> *mut fluid_sfont_t;
572}
573extern "C" {
574    #[doc = " Get the preset of a channel"]
575    pub fn fluid_synth_get_channel_preset(
576        synth: *mut fluid_synth_t,
577        chan: ::std::os::raw::c_int,
578    ) -> *mut fluid_preset_t;
579}
580extern "C" {
581    #[doc = " Offset the bank numbers in a SoundFont. Returns -1 if an error"]
582    #[doc = " occured (out of memory or negative offset)"]
583    pub fn fluid_synth_set_bank_offset(
584        synth: *mut fluid_synth_t,
585        sfont_id: ::std::os::raw::c_int,
586        offset: ::std::os::raw::c_int,
587    ) -> ::std::os::raw::c_int;
588}
589extern "C" {
590    #[doc = " Get the offset of the bank numbers in a SoundFont."]
591    pub fn fluid_synth_get_bank_offset(
592        synth: *mut fluid_synth_t,
593        sfont_id: ::std::os::raw::c_int,
594    ) -> ::std::os::raw::c_int;
595}
596extern "C" {
597    #[doc = " Set the parameters for the built-in reverb unit"]
598    pub fn fluid_synth_set_reverb(
599        synth: *mut fluid_synth_t,
600        roomsize: f64,
601        damping: f64,
602        width: f64,
603        level: f64,
604    );
605}
606extern "C" {
607    #[doc = " Turn on (1) / off (0) the built-in reverb unit"]
608    pub fn fluid_synth_set_reverb_on(synth: *mut fluid_synth_t, on: ::std::os::raw::c_int);
609}
610extern "C" {
611    #[doc = " Query the current state of the reverb."]
612    pub fn fluid_synth_get_reverb_roomsize(synth: *mut fluid_synth_t) -> f64;
613}
614extern "C" {
615    pub fn fluid_synth_get_reverb_damp(synth: *mut fluid_synth_t) -> f64;
616}
617extern "C" {
618    pub fn fluid_synth_get_reverb_level(synth: *mut fluid_synth_t) -> f64;
619}
620extern "C" {
621    pub fn fluid_synth_get_reverb_width(synth: *mut fluid_synth_t) -> f64;
622}
623pub const fluid_chorus_mod_FLUID_CHORUS_MOD_SINE: fluid_chorus_mod = 0;
624pub const fluid_chorus_mod_FLUID_CHORUS_MOD_TRIANGLE: fluid_chorus_mod = 1;
625pub type fluid_chorus_mod = ::std::os::raw::c_uint;
626extern "C" {
627    #[doc = " Set up the chorus. It should be turned on with fluid_synth_set_chorus_on."]
628    #[doc = " If faulty parameters are given, all new settings are discarded."]
629    #[doc = " Keep in mind, that the needed CPU time is proportional to 'nr'."]
630    pub fn fluid_synth_set_chorus(
631        synth: *mut fluid_synth_t,
632        nr: ::std::os::raw::c_int,
633        level: f64,
634        speed: f64,
635        depth_ms: f64,
636        type_: ::std::os::raw::c_int,
637    );
638}
639extern "C" {
640    #[doc = " Turn on (1) / off (0) the built-in chorus unit"]
641    pub fn fluid_synth_set_chorus_on(synth: *mut fluid_synth_t, on: ::std::os::raw::c_int);
642}
643extern "C" {
644    #[doc = " Query the current state of the chorus."]
645    pub fn fluid_synth_get_chorus_nr(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
646}
647extern "C" {
648    pub fn fluid_synth_get_chorus_level(synth: *mut fluid_synth_t) -> f64;
649}
650extern "C" {
651    pub fn fluid_synth_get_chorus_speed_Hz(synth: *mut fluid_synth_t) -> f64;
652}
653extern "C" {
654    pub fn fluid_synth_get_chorus_depth_ms(synth: *mut fluid_synth_t) -> f64;
655}
656extern "C" {
657    pub fn fluid_synth_get_chorus_type(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
658}
659extern "C" {
660    #[doc = " Returns the number of MIDI channels that the synthesizer uses"]
661    #[doc = "internally"]
662    pub fn fluid_synth_count_midi_channels(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
663}
664extern "C" {
665    #[doc = " Returns the number of audio channels that the synthesizer uses"]
666    #[doc = "internally"]
667    pub fn fluid_synth_count_audio_channels(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
668}
669extern "C" {
670    #[doc = " Returns the number of audio groups that the synthesizer uses"]
671    #[doc = "internally. This is usually identical to audio_channels."]
672    pub fn fluid_synth_count_audio_groups(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
673}
674extern "C" {
675    #[doc = " Returns the number of effects channels that the synthesizer uses"]
676    #[doc = "internally"]
677    pub fn fluid_synth_count_effects_channels(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
678}
679extern "C" {
680    #[doc = " Set the master gain"]
681    pub fn fluid_synth_set_gain(synth: *mut fluid_synth_t, gain: f32);
682}
683extern "C" {
684    #[doc = " Get the master gain"]
685    pub fn fluid_synth_get_gain(synth: *mut fluid_synth_t) -> f32;
686}
687extern "C" {
688    #[doc = " Set the polyphony limit (FluidSynth >= 1.0.6)"]
689    pub fn fluid_synth_set_polyphony(
690        synth: *mut fluid_synth_t,
691        polyphony: ::std::os::raw::c_int,
692    ) -> ::std::os::raw::c_int;
693}
694extern "C" {
695    #[doc = " Get the polyphony limit (FluidSynth >= 1.0.6)"]
696    pub fn fluid_synth_get_polyphony(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
697}
698extern "C" {
699    #[doc = " Get the internal buffer size. The internal buffer size if not the"]
700    #[doc = "same thing as the buffer size specified in the"]
701    #[doc = "settings. Internally, the synth *always* uses a specific buffer"]
702    #[doc = "size independent of the buffer size used by the audio driver. The"]
703    #[doc = "internal buffer size is normally 64 samples. The reason why it"]
704    #[doc = "uses an internal buffer size is to allow audio drivers to call the"]
705    #[doc = "synthesizer with a variable buffer length. The internal buffer"]
706    #[doc = "size is useful for client who want to optimize their buffer sizes."]
707    pub fn fluid_synth_get_internal_bufsize(synth: *mut fluid_synth_t) -> ::std::os::raw::c_int;
708}
709extern "C" {
710    #[doc = " Set the interpolation method for one channel or all channels (chan = -1)"]
711    pub fn fluid_synth_set_interp_method(
712        synth: *mut fluid_synth_t,
713        chan: ::std::os::raw::c_int,
714        interp_method: ::std::os::raw::c_int,
715    ) -> ::std::os::raw::c_int;
716}
717pub const fluid_interp_FLUID_INTERP_NONE: fluid_interp = 0;
718pub const fluid_interp_FLUID_INTERP_LINEAR: fluid_interp = 1;
719pub const fluid_interp_FLUID_INTERP_DEFAULT: fluid_interp = 4;
720pub const fluid_interp_FLUID_INTERP_4THORDER: fluid_interp = 4;
721pub const fluid_interp_FLUID_INTERP_7THORDER: fluid_interp = 7;
722pub const fluid_interp_FLUID_INTERP_HIGHEST: fluid_interp = 7;
723pub type fluid_interp = ::std::os::raw::c_uint;
724extern "C" {
725    #[doc = " Change the value of a generator. This function allows to control"]
726    #[doc = "all synthesis parameters in real-time. The changes are additive,"]
727    #[doc = "i.e. they add up to the existing parameter value. This function is"]
728    #[doc = "similar to sending an NRPN message to the synthesizer. The"]
729    #[doc = "function accepts a float as the value of the parameter. The"]
730    #[doc = "parameter numbers and ranges are described in the SoundFont 2.01"]
731    #[doc = "specification, paragraph 8.1.3, page 48. See also 'fluid_gen_type'."]
732    #[doc = ""]
733    #[doc = "\\param synth The synthesizer object."]
734    #[doc = "\\param chan The MIDI channel number."]
735    #[doc = "\\param param The parameter number."]
736    #[doc = "\\param value The parameter value."]
737    #[doc = "\\returns Your favorite dish."]
738    pub fn fluid_synth_set_gen(
739        synth: *mut fluid_synth_t,
740        chan: ::std::os::raw::c_int,
741        param: ::std::os::raw::c_int,
742        value: f32,
743    ) -> ::std::os::raw::c_int;
744}
745extern "C" {
746    #[doc = " Retreive the value of a generator. This function returns the value"]
747    #[doc = "set by a previous call 'fluid_synth_set_gen' or by an NRPN message."]
748    #[doc = ""]
749    #[doc = "\\param synth The synthesizer object."]
750    #[doc = "\\param chan The MIDI channel number."]
751    #[doc = "\\param param The generator number."]
752    #[doc = "\\returns The value of the generator."]
753    pub fn fluid_synth_get_gen(
754        synth: *mut fluid_synth_t,
755        chan: ::std::os::raw::c_int,
756        param: ::std::os::raw::c_int,
757    ) -> f32;
758}
759extern "C" {
760    #[doc = " Create a new key-based tuning with given name, number, and"]
761    #[doc = "pitches. The array 'pitches' should have length 128 and contains"]
762    #[doc = "the pitch in cents of every key in cents. However, if 'pitches' is"]
763    #[doc = "NULL, a new tuning is created with the well-tempered scale."]
764    #[doc = ""]
765    #[doc = "\\param synth The synthesizer object"]
766    #[doc = "\\param tuning_bank The tuning bank number [0-127]"]
767    #[doc = "\\param tuning_prog The tuning program number [0-127]"]
768    #[doc = "\\param name The name of the tuning"]
769    #[doc = "\\param pitch The array of pitch values. The array length has to be 128."]
770    pub fn fluid_synth_create_key_tuning(
771        synth: *mut fluid_synth_t,
772        tuning_bank: ::std::os::raw::c_int,
773        tuning_prog: ::std::os::raw::c_int,
774        name: *const ::std::os::raw::c_char,
775        pitch: *mut f64,
776    ) -> ::std::os::raw::c_int;
777}
778extern "C" {
779    #[doc = " Create a new octave-based tuning with given name, number, and"]
780    #[doc = "pitches.  The array 'pitches' should have length 12 and contains"]
781    #[doc = "derivation in cents from the well-tempered scale. For example, if"]
782    #[doc = "pitches[0] equals -33, then the C-keys will be tuned 33 cents"]
783    #[doc = "below the well-tempered C."]
784    #[doc = ""]
785    #[doc = "\\param synth The synthesizer object"]
786    #[doc = "\\param tuning_bank The tuning bank number [0-127]"]
787    #[doc = "\\param tuning_prog The tuning program number [0-127]"]
788    #[doc = "\\param name The name of the tuning"]
789    #[doc = "\\param pitch The array of pitch derivations. The array length has to be 12."]
790    pub fn fluid_synth_create_octave_tuning(
791        synth: *mut fluid_synth_t,
792        tuning_bank: ::std::os::raw::c_int,
793        tuning_prog: ::std::os::raw::c_int,
794        name: *const ::std::os::raw::c_char,
795        pitch: *const f64,
796    ) -> ::std::os::raw::c_int;
797}
798extern "C" {
799    pub fn fluid_synth_activate_octave_tuning(
800        synth: *mut fluid_synth_t,
801        bank: ::std::os::raw::c_int,
802        prog: ::std::os::raw::c_int,
803        name: *const ::std::os::raw::c_char,
804        pitch: *const f64,
805        apply: ::std::os::raw::c_int,
806    ) -> ::std::os::raw::c_int;
807}
808extern "C" {
809    #[doc = " Request a note tuning changes. Both they 'keys' and 'pitches'"]
810    #[doc = "arrays should be of length 'num_pitches'. If 'apply' is non-zero,"]
811    #[doc = "the changes should be applied in real-time, i.e. sounding notes"]
812    #[doc = "will have their pitch updated. 'APPLY' IS CURRENTLY IGNORED. The"]
813    #[doc = "changes will be available for newly triggered notes only."]
814    #[doc = ""]
815    #[doc = "\\param synth The synthesizer object"]
816    #[doc = "\\param tuning_bank The tuning bank number [0-127]"]
817    #[doc = "\\param tuning_prog The tuning program number [0-127]"]
818    #[doc = "\\param len The length of the keys and pitch arrays"]
819    #[doc = "\\param keys The array of keys values."]
820    #[doc = "\\param pitch The array of pitch values."]
821    #[doc = "\\param apply Flag to indicate whether to changes should be applied in real-time."]
822    pub fn fluid_synth_tune_notes(
823        synth: *mut fluid_synth_t,
824        tuning_bank: ::std::os::raw::c_int,
825        tuning_prog: ::std::os::raw::c_int,
826        len: ::std::os::raw::c_int,
827        keys: *mut ::std::os::raw::c_int,
828        pitch: *mut f64,
829        apply: ::std::os::raw::c_int,
830    ) -> ::std::os::raw::c_int;
831}
832extern "C" {
833    #[doc = " Select a tuning for a channel."]
834    #[doc = ""]
835    #[doc = "\\param synth The synthesizer object"]
836    #[doc = "\\param chan The channel number [0-max channels]"]
837    #[doc = "\\param tuning_bank The tuning bank number [0-127]"]
838    #[doc = "\\param tuning_prog The tuning program number [0-127]"]
839    pub fn fluid_synth_select_tuning(
840        synth: *mut fluid_synth_t,
841        chan: ::std::os::raw::c_int,
842        tuning_bank: ::std::os::raw::c_int,
843        tuning_prog: ::std::os::raw::c_int,
844    ) -> ::std::os::raw::c_int;
845}
846extern "C" {
847    pub fn fluid_synth_activate_tuning(
848        synth: *mut fluid_synth_t,
849        chan: ::std::os::raw::c_int,
850        bank: ::std::os::raw::c_int,
851        prog: ::std::os::raw::c_int,
852        apply: ::std::os::raw::c_int,
853    ) -> ::std::os::raw::c_int;
854}
855extern "C" {
856    #[doc = " Set the tuning to the default well-tempered tuning on a channel."]
857    #[doc = ""]
858    #[doc = "\\param synth The synthesizer object"]
859    #[doc = "\\param chan The channel number [0-max channels]"]
860    pub fn fluid_synth_reset_tuning(
861        synth: *mut fluid_synth_t,
862        chan: ::std::os::raw::c_int,
863    ) -> ::std::os::raw::c_int;
864}
865extern "C" {
866    #[doc = " Start the iteration throught the list of available tunings."]
867    #[doc = ""]
868    #[doc = "\\param synth The synthesizer object"]
869    pub fn fluid_synth_tuning_iteration_start(synth: *mut fluid_synth_t);
870}
871extern "C" {
872    #[doc = " Get the next tuning in the iteration. This functions stores the"]
873    #[doc = "bank and program number of the next tuning in the pointers given as"]
874    #[doc = "arguments."]
875    #[doc = ""]
876    #[doc = "\\param synth The synthesizer object"]
877    #[doc = "\\param bank Pointer to an int to store the bank number"]
878    #[doc = "\\param prog Pointer to an int to store the program number"]
879    #[doc = "\\returns 1 if there is a next tuning, 0 otherwise"]
880    pub fn fluid_synth_tuning_iteration_next(
881        synth: *mut fluid_synth_t,
882        bank: *mut ::std::os::raw::c_int,
883        prog: *mut ::std::os::raw::c_int,
884    ) -> ::std::os::raw::c_int;
885}
886extern "C" {
887    #[doc = " Dump the data of a tuning. This functions stores the name and"]
888    #[doc = "pitch values of a tuning in the pointers given as arguments. Both"]
889    #[doc = "name and pitch can be NULL is the data is not needed."]
890    #[doc = ""]
891    #[doc = "\\param synth The synthesizer object"]
892    #[doc = "\\param bank The tuning bank number [0-127]"]
893    #[doc = "\\param prog The tuning program number [0-127]"]
894    #[doc = "\\param name Pointer to a buffer to store the name"]
895    #[doc = "\\param len The length of the name buffer"]
896    #[doc = "\\param pitch Pointer to buffer to store the pitch values"]
897    pub fn fluid_synth_tuning_dump(
898        synth: *mut fluid_synth_t,
899        bank: ::std::os::raw::c_int,
900        prog: ::std::os::raw::c_int,
901        name: *mut ::std::os::raw::c_char,
902        len: ::std::os::raw::c_int,
903        pitch: *mut f64,
904    ) -> ::std::os::raw::c_int;
905}
906extern "C" {
907    #[doc = " Get a textual representation of the last error"]
908    pub fn fluid_synth_error(synth: *mut fluid_synth_t) -> *mut ::std::os::raw::c_char;
909}
910extern "C" {
911    #[doc = " Generate a number of samples. This function expects two signed"]
912    #[doc = "  16bits buffers (left and right channel) that will be filled with"]
913    #[doc = "  samples."]
914    #[doc = ""]
915    #[doc = "  \\param synth The synthesizer"]
916    #[doc = "  \\param len The number of samples to generate"]
917    #[doc = "  \\param lout The sample buffer for the left channel"]
918    #[doc = "  \\param loff The offset, in samples, in the left buffer where the writing pointer starts"]
919    #[doc = "  \\param lincr The increment, in samples, of the writing pointer in the left buffer"]
920    #[doc = "  \\param rout The sample buffer for the right channel"]
921    #[doc = "  \\param roff The offset, in samples, in the right buffer where the writing pointer starts"]
922    #[doc = "  \\param rincr The increment, in samples, of the writing pointer in the right buffer"]
923    #[doc = "  \\returns 0 if no error occured, non-zero otherwise"]
924    pub fn fluid_synth_write_s16(
925        synth: *mut fluid_synth_t,
926        len: ::std::os::raw::c_int,
927        lout: *mut ::std::os::raw::c_void,
928        loff: ::std::os::raw::c_int,
929        lincr: ::std::os::raw::c_int,
930        rout: *mut ::std::os::raw::c_void,
931        roff: ::std::os::raw::c_int,
932        rincr: ::std::os::raw::c_int,
933    ) -> ::std::os::raw::c_int;
934}
935extern "C" {
936    #[doc = " Generate a number of samples. This function expects two floating"]
937    #[doc = "  point buffers (left and right channel) that will be filled with"]
938    #[doc = "  samples."]
939    #[doc = ""]
940    #[doc = "  \\param synth The synthesizer"]
941    #[doc = "  \\param len The number of samples to generate"]
942    #[doc = "  \\param lout The sample buffer for the left channel"]
943    #[doc = "  \\param loff The offset, in samples, in the left buffer where the writing pointer starts"]
944    #[doc = "  \\param lincr The increment, in samples, of the writing pointer in the left buffer"]
945    #[doc = "  \\param rout The sample buffer for the right channel"]
946    #[doc = "  \\param roff The offset, in samples, in the right buffer where the writing pointer starts"]
947    #[doc = "  \\param rincr The increment, in samples, of the writing pointer in the right buffer"]
948    #[doc = "  \\returns 0 if no error occured, non-zero otherwise"]
949    pub fn fluid_synth_write_float(
950        synth: *mut fluid_synth_t,
951        len: ::std::os::raw::c_int,
952        lout: *mut ::std::os::raw::c_void,
953        loff: ::std::os::raw::c_int,
954        lincr: ::std::os::raw::c_int,
955        rout: *mut ::std::os::raw::c_void,
956        roff: ::std::os::raw::c_int,
957        rincr: ::std::os::raw::c_int,
958    ) -> ::std::os::raw::c_int;
959}
960extern "C" {
961    pub fn fluid_synth_nwrite_float(
962        synth: *mut fluid_synth_t,
963        len: ::std::os::raw::c_int,
964        left: *mut *mut f32,
965        right: *mut *mut f32,
966        fx_left: *mut *mut f32,
967        fx_right: *mut *mut f32,
968    ) -> ::std::os::raw::c_int;
969}
970extern "C" {
971    #[doc = " Generate a number of samples. This function implements the"]
972    #[doc = "  default interface defined in fluidsynth/audio.h. This function"]
973    #[doc = "  ignores the input buffers and expects at least two output"]
974    #[doc = "  buffer."]
975    #[doc = ""]
976    #[doc = "  \\param synth The synthesizer"]
977    #[doc = "  \\param len The number of samples to generate"]
978    #[doc = "  \\param nin The number of input buffers"]
979    #[doc = "  \\param in The array of input buffers"]
980    #[doc = "  \\param nout The number of output buffers"]
981    #[doc = "  \\param out The array of output buffers"]
982    #[doc = "  \\returns 0 if no error occured, non-zero otherwise"]
983    pub fn fluid_synth_process(
984        synth: *mut fluid_synth_t,
985        len: ::std::os::raw::c_int,
986        nin: ::std::os::raw::c_int,
987        in_: *mut *mut f32,
988        nout: ::std::os::raw::c_int,
989        out: *mut *mut f32,
990    ) -> ::std::os::raw::c_int;
991}
992pub type fluid_audio_callback_t = ::std::option::Option<
993    unsafe extern "C" fn(
994        synth: *mut fluid_synth_t,
995        len: ::std::os::raw::c_int,
996        out1: *mut ::std::os::raw::c_void,
997        loff: ::std::os::raw::c_int,
998        lincr: ::std::os::raw::c_int,
999        out2: *mut ::std::os::raw::c_void,
1000        roff: ::std::os::raw::c_int,
1001        rincr: ::std::os::raw::c_int,
1002    ) -> ::std::os::raw::c_int,
1003>;
1004extern "C" {
1005    #[doc = " Add a SoundFont loader to the synthesizer. Note that SoundFont"]
1006    #[doc = "loader don't necessarily load SoundFonts. They can load any type"]
1007    #[doc = "of wavetable data but export a SoundFont interface."]
1008    pub fn fluid_synth_add_sfloader(synth: *mut fluid_synth_t, loader: *mut fluid_sfloader_t);
1009}
1010extern "C" {
1011    #[doc = " Allocate a synthesis voice. This function is called by a"]
1012    #[doc = "soundfont's preset in response to a noteon event."]
1013    #[doc = "The returned voice comes with default modulators installed (velocity-to-attenuation,"]
1014    #[doc = "velocity to filter, ...)"]
1015    #[doc = "Note: A single noteon event may create any number of voices, when the preset is layered."]
1016    #[doc = "Typically 1 (mono) or 2 (stereo)."]
1017    pub fn fluid_synth_alloc_voice(
1018        synth: *mut fluid_synth_t,
1019        sample: *mut fluid_sample_t,
1020        channum: ::std::os::raw::c_int,
1021        key: ::std::os::raw::c_int,
1022        vel: ::std::os::raw::c_int,
1023    ) -> *mut fluid_voice_t;
1024}
1025extern "C" {
1026    #[doc = " Start a synthesis voice. This function is called by a"]
1027    #[doc = "soundfont's preset in response to a noteon event after the voice"]
1028    #[doc = "has been allocated with fluid_synth_alloc_voice() and"]
1029    #[doc = "initialized."]
1030    #[doc = "Exclusive classes are processed here."]
1031    pub fn fluid_synth_start_voice(synth: *mut fluid_synth_t, voice: *mut fluid_voice_t);
1032}
1033extern "C" {
1034    #[doc = " Write a list of all voices matching ID into buf, but not more than bufsize voices."]
1035    #[doc = " If ID <0, return all voices."]
1036    pub fn fluid_synth_get_voicelist(
1037        synth: *mut fluid_synth_t,
1038        buf: *mut *mut fluid_voice_t,
1039        bufsize: ::std::os::raw::c_int,
1040        ID: ::std::os::raw::c_int,
1041    );
1042}
1043pub const FLUID_PRESET_SELECTED: ::std::os::raw::c_uint = 0;
1044pub const FLUID_PRESET_UNSELECTED: ::std::os::raw::c_uint = 1;
1045pub const FLUID_SAMPLE_DONE: ::std::os::raw::c_uint = 2;
1046#[doc = "   SoundFont plugins"]
1047#[doc = ""]
1048#[doc = "    It is possible to add new SoundFont loaders to the"]
1049#[doc = "    synthesizer. The API uses a couple of \"interfaces\" (structures"]
1050#[doc = "    with callback functions): fluid_sfloader_t, fluid_sfont_t, and"]
1051#[doc = "    fluid_preset_t."]
1052#[doc = ""]
1053#[doc = "    To add a new SoundFont loader to the synthesizer, call"]
1054#[doc = "    fluid_synth_add_sfloader() and pass a pointer to an"]
1055#[doc = "    fluid_sfloader_t structure. The important callback function in"]
1056#[doc = "    this structure is \"load\", which should try to load a file and"]
1057#[doc = "    returns a fluid_sfont_t structure, or NULL if it fails."]
1058#[doc = ""]
1059#[doc = "    The fluid_sfont_t structure contains a callback to obtain the"]
1060#[doc = "    name of the soundfont. It contains two functions to iterate"]
1061#[doc = "    though the contained presets, and one function to obtain a"]
1062#[doc = "    preset corresponding to a bank and preset number. This"]
1063#[doc = "    function should return an fluid_preset_t structure."]
1064#[doc = ""]
1065#[doc = "    The fluid_preset_t structure contains some functions to obtain"]
1066#[doc = "    information from the preset (name, bank, number). The most"]
1067#[doc = "    important callback is the noteon function. The noteon function"]
1068#[doc = "    should call fluid_synth_alloc_voice() for every sample that has"]
1069#[doc = "    to be played. fluid_synth_alloc_voice() expects a pointer to a"]
1070#[doc = "    fluid_sample_t structure and returns a pointer to the opaque"]
1071#[doc = "    fluid_voice_t structure. To set or increments the values of a"]
1072#[doc = "    generator, use fluid_voice_gen_{set,incr}. When you are"]
1073#[doc = "    finished initializing the voice call fluid_voice_start() to"]
1074#[doc = "    start playing the synthesis voice."]
1075pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
1076#[repr(C)]
1077#[derive(Debug, Copy, Clone)]
1078pub struct _fluid_sfloader_t {
1079    #[doc = " Private data"]
1080    pub data: *mut ::std::os::raw::c_void,
1081    #[doc = " The free must free the memory allocated for the loader in"]
1082    #[doc = " addition to any private data. It should return 0 if no error"]
1083    #[doc = " occured, non-zero otherwise."]
1084    pub free: ::std::option::Option<
1085        unsafe extern "C" fn(loader: *mut fluid_sfloader_t) -> ::std::os::raw::c_int,
1086    >,
1087    #[doc = " Load a file. Returns NULL if an error occured."]
1088    pub load: ::std::option::Option<
1089        unsafe extern "C" fn(
1090            loader: *mut fluid_sfloader_t,
1091            filename: *const ::std::os::raw::c_char,
1092        ) -> *mut fluid_sfont_t,
1093    >,
1094    #[doc = " Callback structure specifying file operations used during soundfont loading to allow custom loading, such as from memory"]
1095    pub fileapi: *mut fluid_fileapi_t,
1096}
1097#[test]
1098fn bindgen_test_layout__fluid_sfloader_t() {
1099    assert_eq!(
1100        ::std::mem::size_of::<_fluid_sfloader_t>(),
1101        32usize,
1102        concat!("Size of: ", stringify!(_fluid_sfloader_t))
1103    );
1104    assert_eq!(
1105        ::std::mem::align_of::<_fluid_sfloader_t>(),
1106        8usize,
1107        concat!("Alignment of ", stringify!(_fluid_sfloader_t))
1108    );
1109    assert_eq!(
1110        unsafe { &(*(::std::ptr::null::<_fluid_sfloader_t>())).data as *const _ as usize },
1111        0usize,
1112        concat!(
1113            "Offset of field: ",
1114            stringify!(_fluid_sfloader_t),
1115            "::",
1116            stringify!(data)
1117        )
1118    );
1119    assert_eq!(
1120        unsafe { &(*(::std::ptr::null::<_fluid_sfloader_t>())).free as *const _ as usize },
1121        8usize,
1122        concat!(
1123            "Offset of field: ",
1124            stringify!(_fluid_sfloader_t),
1125            "::",
1126            stringify!(free)
1127        )
1128    );
1129    assert_eq!(
1130        unsafe { &(*(::std::ptr::null::<_fluid_sfloader_t>())).load as *const _ as usize },
1131        16usize,
1132        concat!(
1133            "Offset of field: ",
1134            stringify!(_fluid_sfloader_t),
1135            "::",
1136            stringify!(load)
1137        )
1138    );
1139    assert_eq!(
1140        unsafe { &(*(::std::ptr::null::<_fluid_sfloader_t>())).fileapi as *const _ as usize },
1141        24usize,
1142        concat!(
1143            "Offset of field: ",
1144            stringify!(_fluid_sfloader_t),
1145            "::",
1146            stringify!(fileapi)
1147        )
1148    );
1149}
1150#[doc = " File callback structure to enable custom soundfont loading (e.g. from memory)."]
1151#[repr(C)]
1152#[derive(Debug, Copy, Clone)]
1153pub struct _fluid_fileapi_t {
1154    #[doc = " Private data"]
1155    pub data: *mut ::std::os::raw::c_void,
1156    #[doc = " The free must free the memory allocated for the loader in"]
1157    #[doc = " addition to any private data. It should return 0 if no error"]
1158    #[doc = " occured, non-zero otherwise."]
1159    pub free: ::std::option::Option<
1160        unsafe extern "C" fn(fileapi: *mut fluid_fileapi_t) -> ::std::os::raw::c_int,
1161    >,
1162    #[doc = " Opens the file or memory indicated by \\c filename in binary read mode."]
1163    #[doc = " \\c filename matches the one provided during the fluid_synth_sfload() call."]
1164    #[doc = ""]
1165    #[doc = " @return returns a file handle on success, NULL otherwise"]
1166    pub fopen: ::std::option::Option<
1167        unsafe extern "C" fn(
1168            fileapi: *mut fluid_fileapi_t,
1169            filename: *const ::std::os::raw::c_char,
1170        ) -> *mut ::std::os::raw::c_void,
1171    >,
1172    #[doc = " Reads \\c count bytes to the specified buffer \\c buf."]
1173    #[doc = ""]
1174    #[doc = " @return returns #FLUID_OK if exactly \\c count bytes were successfully read, else #FLUID_FAILED"]
1175    pub fread: ::std::option::Option<
1176        unsafe extern "C" fn(
1177            buf: *mut ::std::os::raw::c_void,
1178            count: ::std::os::raw::c_int,
1179            handle: *mut ::std::os::raw::c_void,
1180        ) -> ::std::os::raw::c_int,
1181    >,
1182    #[doc = " Same purpose and behaviour as fseek."]
1183    #[doc = ""]
1184    #[doc = " @param origin either \\c SEEK_SET, \\c SEEK_CUR or \\c SEEK_END"]
1185    #[doc = ""]
1186    #[doc = " @return returns #FLUID_OK if the seek was successfully performed while not seeking beyond a buffer or file, #FLUID_FAILED otherwise"]
1187    pub fseek: ::std::option::Option<
1188        unsafe extern "C" fn(
1189            handle: *mut ::std::os::raw::c_void,
1190            offset: ::std::os::raw::c_long,
1191            origin: ::std::os::raw::c_int,
1192        ) -> ::std::os::raw::c_int,
1193    >,
1194    #[doc = " Closes the handle and frees used ressources."]
1195    #[doc = ""]
1196    #[doc = " @return returns #FLUID_OK on success, #FLUID_FAILED on error"]
1197    pub fclose: ::std::option::Option<
1198        unsafe extern "C" fn(handle: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
1199    >,
1200    #[doc = " @return returns current file offset or #FLUID_FAILED on error"]
1201    pub ftell: ::std::option::Option<
1202        unsafe extern "C" fn(handle: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_long,
1203    >,
1204}
1205#[test]
1206fn bindgen_test_layout__fluid_fileapi_t() {
1207    assert_eq!(
1208        ::std::mem::size_of::<_fluid_fileapi_t>(),
1209        56usize,
1210        concat!("Size of: ", stringify!(_fluid_fileapi_t))
1211    );
1212    assert_eq!(
1213        ::std::mem::align_of::<_fluid_fileapi_t>(),
1214        8usize,
1215        concat!("Alignment of ", stringify!(_fluid_fileapi_t))
1216    );
1217    assert_eq!(
1218        unsafe { &(*(::std::ptr::null::<_fluid_fileapi_t>())).data as *const _ as usize },
1219        0usize,
1220        concat!(
1221            "Offset of field: ",
1222            stringify!(_fluid_fileapi_t),
1223            "::",
1224            stringify!(data)
1225        )
1226    );
1227    assert_eq!(
1228        unsafe { &(*(::std::ptr::null::<_fluid_fileapi_t>())).free as *const _ as usize },
1229        8usize,
1230        concat!(
1231            "Offset of field: ",
1232            stringify!(_fluid_fileapi_t),
1233            "::",
1234            stringify!(free)
1235        )
1236    );
1237    assert_eq!(
1238        unsafe { &(*(::std::ptr::null::<_fluid_fileapi_t>())).fopen as *const _ as usize },
1239        16usize,
1240        concat!(
1241            "Offset of field: ",
1242            stringify!(_fluid_fileapi_t),
1243            "::",
1244            stringify!(fopen)
1245        )
1246    );
1247    assert_eq!(
1248        unsafe { &(*(::std::ptr::null::<_fluid_fileapi_t>())).fread as *const _ as usize },
1249        24usize,
1250        concat!(
1251            "Offset of field: ",
1252            stringify!(_fluid_fileapi_t),
1253            "::",
1254            stringify!(fread)
1255        )
1256    );
1257    assert_eq!(
1258        unsafe { &(*(::std::ptr::null::<_fluid_fileapi_t>())).fseek as *const _ as usize },
1259        32usize,
1260        concat!(
1261            "Offset of field: ",
1262            stringify!(_fluid_fileapi_t),
1263            "::",
1264            stringify!(fseek)
1265        )
1266    );
1267    assert_eq!(
1268        unsafe { &(*(::std::ptr::null::<_fluid_fileapi_t>())).fclose as *const _ as usize },
1269        40usize,
1270        concat!(
1271            "Offset of field: ",
1272            stringify!(_fluid_fileapi_t),
1273            "::",
1274            stringify!(fclose)
1275        )
1276    );
1277    assert_eq!(
1278        unsafe { &(*(::std::ptr::null::<_fluid_fileapi_t>())).ftell as *const _ as usize },
1279        48usize,
1280        concat!(
1281            "Offset of field: ",
1282            stringify!(_fluid_fileapi_t),
1283            "::",
1284            stringify!(ftell)
1285        )
1286    );
1287}
1288extern "C" {
1289    pub fn fluid_init_default_fileapi(fileapi: *mut fluid_fileapi_t);
1290}
1291extern "C" {
1292    pub fn fluid_set_default_fileapi(fileapi: *mut fluid_fileapi_t);
1293}
1294extern "C" {
1295    pub fn new_fluid_defsfloader() -> *mut fluid_sfloader_t;
1296}
1297extern "C" {
1298    pub fn delete_fluid_defsfloader(loader: *mut fluid_sfloader_t) -> ::std::os::raw::c_int;
1299}
1300#[repr(C)]
1301#[derive(Debug, Copy, Clone)]
1302pub struct _fluid_sfont_t {
1303    pub data: *mut ::std::os::raw::c_void,
1304    pub id: ::std::os::raw::c_uint,
1305    #[doc = " The 'free' callback function should return 0 when it was able to"]
1306    #[doc = "free all resources. It should return a non-zero value if some of"]
1307    #[doc = "the samples could not be freed because they are still in use."]
1308    pub free: ::std::option::Option<
1309        unsafe extern "C" fn(sfont: *mut fluid_sfont_t) -> ::std::os::raw::c_int,
1310    >,
1311    #[doc = " Return the name of the sfont"]
1312    pub get_name: ::std::option::Option<
1313        unsafe extern "C" fn(sfont: *mut fluid_sfont_t) -> *mut ::std::os::raw::c_char,
1314    >,
1315    #[doc = " Return the preset with the specified bank and preset number. All"]
1316    #[doc = "  the fields, including the 'sfont' field, should * be filled"]
1317    #[doc = "  in. If the preset cannot be found, the function returns NULL."]
1318    pub get_preset: ::std::option::Option<
1319        unsafe extern "C" fn(
1320            sfont: *mut fluid_sfont_t,
1321            bank: ::std::os::raw::c_uint,
1322            prenum: ::std::os::raw::c_uint,
1323        ) -> *mut fluid_preset_t,
1324    >,
1325    pub iteration_start: ::std::option::Option<unsafe extern "C" fn(sfont: *mut fluid_sfont_t)>,
1326    pub iteration_next: ::std::option::Option<
1327        unsafe extern "C" fn(
1328            sfont: *mut fluid_sfont_t,
1329            preset: *mut fluid_preset_t,
1330        ) -> ::std::os::raw::c_int,
1331    >,
1332}
1333#[test]
1334fn bindgen_test_layout__fluid_sfont_t() {
1335    assert_eq!(
1336        ::std::mem::size_of::<_fluid_sfont_t>(),
1337        56usize,
1338        concat!("Size of: ", stringify!(_fluid_sfont_t))
1339    );
1340    assert_eq!(
1341        ::std::mem::align_of::<_fluid_sfont_t>(),
1342        8usize,
1343        concat!("Alignment of ", stringify!(_fluid_sfont_t))
1344    );
1345    assert_eq!(
1346        unsafe { &(*(::std::ptr::null::<_fluid_sfont_t>())).data as *const _ as usize },
1347        0usize,
1348        concat!(
1349            "Offset of field: ",
1350            stringify!(_fluid_sfont_t),
1351            "::",
1352            stringify!(data)
1353        )
1354    );
1355    assert_eq!(
1356        unsafe { &(*(::std::ptr::null::<_fluid_sfont_t>())).id as *const _ as usize },
1357        8usize,
1358        concat!(
1359            "Offset of field: ",
1360            stringify!(_fluid_sfont_t),
1361            "::",
1362            stringify!(id)
1363        )
1364    );
1365    assert_eq!(
1366        unsafe { &(*(::std::ptr::null::<_fluid_sfont_t>())).free as *const _ as usize },
1367        16usize,
1368        concat!(
1369            "Offset of field: ",
1370            stringify!(_fluid_sfont_t),
1371            "::",
1372            stringify!(free)
1373        )
1374    );
1375    assert_eq!(
1376        unsafe { &(*(::std::ptr::null::<_fluid_sfont_t>())).get_name as *const _ as usize },
1377        24usize,
1378        concat!(
1379            "Offset of field: ",
1380            stringify!(_fluid_sfont_t),
1381            "::",
1382            stringify!(get_name)
1383        )
1384    );
1385    assert_eq!(
1386        unsafe { &(*(::std::ptr::null::<_fluid_sfont_t>())).get_preset as *const _ as usize },
1387        32usize,
1388        concat!(
1389            "Offset of field: ",
1390            stringify!(_fluid_sfont_t),
1391            "::",
1392            stringify!(get_preset)
1393        )
1394    );
1395    assert_eq!(
1396        unsafe { &(*(::std::ptr::null::<_fluid_sfont_t>())).iteration_start as *const _ as usize },
1397        40usize,
1398        concat!(
1399            "Offset of field: ",
1400            stringify!(_fluid_sfont_t),
1401            "::",
1402            stringify!(iteration_start)
1403        )
1404    );
1405    assert_eq!(
1406        unsafe { &(*(::std::ptr::null::<_fluid_sfont_t>())).iteration_next as *const _ as usize },
1407        48usize,
1408        concat!(
1409            "Offset of field: ",
1410            stringify!(_fluid_sfont_t),
1411            "::",
1412            stringify!(iteration_next)
1413        )
1414    );
1415}
1416#[repr(C)]
1417#[derive(Debug, Copy, Clone)]
1418pub struct _fluid_preset_t {
1419    pub data: *mut ::std::os::raw::c_void,
1420    pub sfont: *mut fluid_sfont_t,
1421    pub free: ::std::option::Option<
1422        unsafe extern "C" fn(preset: *mut fluid_preset_t) -> ::std::os::raw::c_int,
1423    >,
1424    pub get_name: ::std::option::Option<
1425        unsafe extern "C" fn(preset: *mut fluid_preset_t) -> *mut ::std::os::raw::c_char,
1426    >,
1427    pub get_banknum: ::std::option::Option<
1428        unsafe extern "C" fn(preset: *mut fluid_preset_t) -> ::std::os::raw::c_int,
1429    >,
1430    pub get_num: ::std::option::Option<
1431        unsafe extern "C" fn(preset: *mut fluid_preset_t) -> ::std::os::raw::c_int,
1432    >,
1433    #[doc = " handle a noteon event. Returns 0 if no error occured."]
1434    pub noteon: ::std::option::Option<
1435        unsafe extern "C" fn(
1436            preset: *mut fluid_preset_t,
1437            synth: *mut fluid_synth_t,
1438            chan: ::std::os::raw::c_int,
1439            key: ::std::os::raw::c_int,
1440            vel: ::std::os::raw::c_int,
1441        ) -> ::std::os::raw::c_int,
1442    >,
1443    #[doc = " Implement this function if the preset needs to be notified about"]
1444    #[doc = "preset select and unselect events."]
1445    pub notify: ::std::option::Option<
1446        unsafe extern "C" fn(
1447            preset: *mut fluid_preset_t,
1448            reason: ::std::os::raw::c_int,
1449            chan: ::std::os::raw::c_int,
1450        ) -> ::std::os::raw::c_int,
1451    >,
1452}
1453#[test]
1454fn bindgen_test_layout__fluid_preset_t() {
1455    assert_eq!(
1456        ::std::mem::size_of::<_fluid_preset_t>(),
1457        64usize,
1458        concat!("Size of: ", stringify!(_fluid_preset_t))
1459    );
1460    assert_eq!(
1461        ::std::mem::align_of::<_fluid_preset_t>(),
1462        8usize,
1463        concat!("Alignment of ", stringify!(_fluid_preset_t))
1464    );
1465    assert_eq!(
1466        unsafe { &(*(::std::ptr::null::<_fluid_preset_t>())).data as *const _ as usize },
1467        0usize,
1468        concat!(
1469            "Offset of field: ",
1470            stringify!(_fluid_preset_t),
1471            "::",
1472            stringify!(data)
1473        )
1474    );
1475    assert_eq!(
1476        unsafe { &(*(::std::ptr::null::<_fluid_preset_t>())).sfont as *const _ as usize },
1477        8usize,
1478        concat!(
1479            "Offset of field: ",
1480            stringify!(_fluid_preset_t),
1481            "::",
1482            stringify!(sfont)
1483        )
1484    );
1485    assert_eq!(
1486        unsafe { &(*(::std::ptr::null::<_fluid_preset_t>())).free as *const _ as usize },
1487        16usize,
1488        concat!(
1489            "Offset of field: ",
1490            stringify!(_fluid_preset_t),
1491            "::",
1492            stringify!(free)
1493        )
1494    );
1495    assert_eq!(
1496        unsafe { &(*(::std::ptr::null::<_fluid_preset_t>())).get_name as *const _ as usize },
1497        24usize,
1498        concat!(
1499            "Offset of field: ",
1500            stringify!(_fluid_preset_t),
1501            "::",
1502            stringify!(get_name)
1503        )
1504    );
1505    assert_eq!(
1506        unsafe { &(*(::std::ptr::null::<_fluid_preset_t>())).get_banknum as *const _ as usize },
1507        32usize,
1508        concat!(
1509            "Offset of field: ",
1510            stringify!(_fluid_preset_t),
1511            "::",
1512            stringify!(get_banknum)
1513        )
1514    );
1515    assert_eq!(
1516        unsafe { &(*(::std::ptr::null::<_fluid_preset_t>())).get_num as *const _ as usize },
1517        40usize,
1518        concat!(
1519            "Offset of field: ",
1520            stringify!(_fluid_preset_t),
1521            "::",
1522            stringify!(get_num)
1523        )
1524    );
1525    assert_eq!(
1526        unsafe { &(*(::std::ptr::null::<_fluid_preset_t>())).noteon as *const _ as usize },
1527        48usize,
1528        concat!(
1529            "Offset of field: ",
1530            stringify!(_fluid_preset_t),
1531            "::",
1532            stringify!(noteon)
1533        )
1534    );
1535    assert_eq!(
1536        unsafe { &(*(::std::ptr::null::<_fluid_preset_t>())).notify as *const _ as usize },
1537        56usize,
1538        concat!(
1539            "Offset of field: ",
1540            stringify!(_fluid_preset_t),
1541            "::",
1542            stringify!(notify)
1543        )
1544    );
1545}
1546#[repr(C)]
1547#[derive(Debug, Copy, Clone)]
1548pub struct _fluid_sample_t {
1549    pub name: [::std::os::raw::c_char; 21usize],
1550    pub start: ::std::os::raw::c_uint,
1551    pub end: ::std::os::raw::c_uint,
1552    pub loopstart: ::std::os::raw::c_uint,
1553    pub loopend: ::std::os::raw::c_uint,
1554    pub samplerate: ::std::os::raw::c_uint,
1555    pub origpitch: ::std::os::raw::c_int,
1556    pub pitchadj: ::std::os::raw::c_int,
1557    pub sampletype: ::std::os::raw::c_int,
1558    pub valid: ::std::os::raw::c_int,
1559    pub data: *mut ::std::os::raw::c_short,
1560    #[doc = " The amplitude, that will lower the level of the sample's loop to"]
1561    #[doc = "the noise floor. Needed for note turnoff optimization, will be"]
1562    #[doc = "filled out automatically"]
1563    pub amplitude_that_reaches_noise_floor_is_valid: ::std::os::raw::c_int,
1564    pub amplitude_that_reaches_noise_floor: f64,
1565    #[doc = " Count the number of playing voices that use this sample."]
1566    pub refcount: ::std::os::raw::c_uint,
1567    #[doc = " Implement this function if the sample or SoundFont needs to be"]
1568    #[doc = "notified when the sample is no longer used."]
1569    pub notify: ::std::option::Option<
1570        unsafe extern "C" fn(
1571            sample: *mut fluid_sample_t,
1572            reason: ::std::os::raw::c_int,
1573        ) -> ::std::os::raw::c_int,
1574    >,
1575    #[doc = " Pointer to SoundFont specific data"]
1576    pub userdata: *mut ::std::os::raw::c_void,
1577}
1578#[test]
1579fn bindgen_test_layout__fluid_sample_t() {
1580    assert_eq!(
1581        ::std::mem::size_of::<_fluid_sample_t>(),
1582        112usize,
1583        concat!("Size of: ", stringify!(_fluid_sample_t))
1584    );
1585    assert_eq!(
1586        ::std::mem::align_of::<_fluid_sample_t>(),
1587        8usize,
1588        concat!("Alignment of ", stringify!(_fluid_sample_t))
1589    );
1590    assert_eq!(
1591        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).name as *const _ as usize },
1592        0usize,
1593        concat!(
1594            "Offset of field: ",
1595            stringify!(_fluid_sample_t),
1596            "::",
1597            stringify!(name)
1598        )
1599    );
1600    assert_eq!(
1601        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).start as *const _ as usize },
1602        24usize,
1603        concat!(
1604            "Offset of field: ",
1605            stringify!(_fluid_sample_t),
1606            "::",
1607            stringify!(start)
1608        )
1609    );
1610    assert_eq!(
1611        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).end as *const _ as usize },
1612        28usize,
1613        concat!(
1614            "Offset of field: ",
1615            stringify!(_fluid_sample_t),
1616            "::",
1617            stringify!(end)
1618        )
1619    );
1620    assert_eq!(
1621        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).loopstart as *const _ as usize },
1622        32usize,
1623        concat!(
1624            "Offset of field: ",
1625            stringify!(_fluid_sample_t),
1626            "::",
1627            stringify!(loopstart)
1628        )
1629    );
1630    assert_eq!(
1631        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).loopend as *const _ as usize },
1632        36usize,
1633        concat!(
1634            "Offset of field: ",
1635            stringify!(_fluid_sample_t),
1636            "::",
1637            stringify!(loopend)
1638        )
1639    );
1640    assert_eq!(
1641        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).samplerate as *const _ as usize },
1642        40usize,
1643        concat!(
1644            "Offset of field: ",
1645            stringify!(_fluid_sample_t),
1646            "::",
1647            stringify!(samplerate)
1648        )
1649    );
1650    assert_eq!(
1651        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).origpitch as *const _ as usize },
1652        44usize,
1653        concat!(
1654            "Offset of field: ",
1655            stringify!(_fluid_sample_t),
1656            "::",
1657            stringify!(origpitch)
1658        )
1659    );
1660    assert_eq!(
1661        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).pitchadj as *const _ as usize },
1662        48usize,
1663        concat!(
1664            "Offset of field: ",
1665            stringify!(_fluid_sample_t),
1666            "::",
1667            stringify!(pitchadj)
1668        )
1669    );
1670    assert_eq!(
1671        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).sampletype as *const _ as usize },
1672        52usize,
1673        concat!(
1674            "Offset of field: ",
1675            stringify!(_fluid_sample_t),
1676            "::",
1677            stringify!(sampletype)
1678        )
1679    );
1680    assert_eq!(
1681        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).valid as *const _ as usize },
1682        56usize,
1683        concat!(
1684            "Offset of field: ",
1685            stringify!(_fluid_sample_t),
1686            "::",
1687            stringify!(valid)
1688        )
1689    );
1690    assert_eq!(
1691        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).data as *const _ as usize },
1692        64usize,
1693        concat!(
1694            "Offset of field: ",
1695            stringify!(_fluid_sample_t),
1696            "::",
1697            stringify!(data)
1698        )
1699    );
1700    assert_eq!(
1701        unsafe {
1702            &(*(::std::ptr::null::<_fluid_sample_t>())).amplitude_that_reaches_noise_floor_is_valid
1703                as *const _ as usize
1704        },
1705        72usize,
1706        concat!(
1707            "Offset of field: ",
1708            stringify!(_fluid_sample_t),
1709            "::",
1710            stringify!(amplitude_that_reaches_noise_floor_is_valid)
1711        )
1712    );
1713    assert_eq!(
1714        unsafe {
1715            &(*(::std::ptr::null::<_fluid_sample_t>())).amplitude_that_reaches_noise_floor
1716                as *const _ as usize
1717        },
1718        80usize,
1719        concat!(
1720            "Offset of field: ",
1721            stringify!(_fluid_sample_t),
1722            "::",
1723            stringify!(amplitude_that_reaches_noise_floor)
1724        )
1725    );
1726    assert_eq!(
1727        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).refcount as *const _ as usize },
1728        88usize,
1729        concat!(
1730            "Offset of field: ",
1731            stringify!(_fluid_sample_t),
1732            "::",
1733            stringify!(refcount)
1734        )
1735    );
1736    assert_eq!(
1737        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).notify as *const _ as usize },
1738        96usize,
1739        concat!(
1740            "Offset of field: ",
1741            stringify!(_fluid_sample_t),
1742            "::",
1743            stringify!(notify)
1744        )
1745    );
1746    assert_eq!(
1747        unsafe { &(*(::std::ptr::null::<_fluid_sample_t>())).userdata as *const _ as usize },
1748        104usize,
1749        concat!(
1750            "Offset of field: ",
1751            stringify!(_fluid_sample_t),
1752            "::",
1753            stringify!(userdata)
1754        )
1755    );
1756}
1757extern "C" {
1758    #[doc = " Creates a fluid_sfont_t wrapping an fluid_ramsfont_t"]
1759    pub fn fluid_ramsfont_create_sfont() -> *mut fluid_sfont_t;
1760}
1761extern "C" {
1762    #[doc = " ramsfont specific API"]
1763    pub fn fluid_ramsfont_set_name(
1764        sfont: *mut fluid_ramsfont_t,
1765        name: *mut ::std::os::raw::c_char,
1766    ) -> ::std::os::raw::c_int;
1767}
1768extern "C" {
1769    pub fn fluid_ramsfont_add_izone(
1770        sfont: *mut fluid_ramsfont_t,
1771        bank: ::std::os::raw::c_uint,
1772        num: ::std::os::raw::c_uint,
1773        sample: *mut fluid_sample_t,
1774        lokey: ::std::os::raw::c_int,
1775        hikey: ::std::os::raw::c_int,
1776    ) -> ::std::os::raw::c_int;
1777}
1778extern "C" {
1779    pub fn fluid_ramsfont_remove_izone(
1780        sfont: *mut fluid_ramsfont_t,
1781        bank: ::std::os::raw::c_uint,
1782        num: ::std::os::raw::c_uint,
1783        sample: *mut fluid_sample_t,
1784    ) -> ::std::os::raw::c_int;
1785}
1786extern "C" {
1787    pub fn fluid_ramsfont_izone_set_gen(
1788        sfont: *mut fluid_ramsfont_t,
1789        bank: ::std::os::raw::c_uint,
1790        num: ::std::os::raw::c_uint,
1791        sample: *mut fluid_sample_t,
1792        gen_type: ::std::os::raw::c_int,
1793        value: f32,
1794    ) -> ::std::os::raw::c_int;
1795}
1796extern "C" {
1797    pub fn fluid_ramsfont_izone_set_loop(
1798        sfont: *mut fluid_ramsfont_t,
1799        bank: ::std::os::raw::c_uint,
1800        num: ::std::os::raw::c_uint,
1801        sample: *mut fluid_sample_t,
1802        on: ::std::os::raw::c_int,
1803        loopstart: f32,
1804        loopend: f32,
1805    ) -> ::std::os::raw::c_int;
1806}
1807extern "C" {
1808    #[doc = " sample_t specific API for ramsfont"]
1809    pub fn new_fluid_ramsample() -> *mut fluid_sample_t;
1810}
1811extern "C" {
1812    pub fn delete_fluid_ramsample(sample: *mut fluid_sample_t) -> ::std::os::raw::c_int;
1813}
1814extern "C" {
1815    pub fn fluid_sample_set_name(
1816        sample: *mut fluid_sample_t,
1817        name: *mut ::std::os::raw::c_char,
1818    ) -> ::std::os::raw::c_int;
1819}
1820extern "C" {
1821    pub fn fluid_sample_set_sound_data(
1822        sample: *mut fluid_sample_t,
1823        data: *mut ::std::os::raw::c_short,
1824        nbframes: ::std::os::raw::c_uint,
1825        copy_data: ::std::os::raw::c_short,
1826        rootkey: ::std::os::raw::c_int,
1827    ) -> ::std::os::raw::c_int;
1828}
1829#[doc = "< The synth can't function correctly any more"]
1830pub const fluid_log_level_FLUID_PANIC: fluid_log_level = 0;
1831#[doc = "< Serious error occurred"]
1832pub const fluid_log_level_FLUID_ERR: fluid_log_level = 1;
1833#[doc = "< Warning"]
1834pub const fluid_log_level_FLUID_WARN: fluid_log_level = 2;
1835#[doc = "< Verbose informational messages"]
1836pub const fluid_log_level_FLUID_INFO: fluid_log_level = 3;
1837#[doc = "< Debugging messages"]
1838pub const fluid_log_level_FLUID_DBG: fluid_log_level = 4;
1839pub const fluid_log_level_LAST_LOG_LEVEL: fluid_log_level = 5;
1840#[doc = " FluidSynth log levels."]
1841pub type fluid_log_level = ::std::os::raw::c_uint;
1842#[doc = " Log function handler callback type used by fluid_set_log_function()."]
1843#[doc = " @param level Log level (#fluid_log_level)"]
1844#[doc = " @param message Log message text"]
1845#[doc = " @param data User data pointer supplied to fluid_set_log_function()."]
1846pub type fluid_log_function_t = ::std::option::Option<
1847    unsafe extern "C" fn(
1848        level: ::std::os::raw::c_int,
1849        message: *mut ::std::os::raw::c_char,
1850        data: *mut ::std::os::raw::c_void,
1851    ),
1852>;
1853extern "C" {
1854    pub fn fluid_set_log_function(
1855        level: ::std::os::raw::c_int,
1856        fun: fluid_log_function_t,
1857        data: *mut ::std::os::raw::c_void,
1858    ) -> fluid_log_function_t;
1859}
1860extern "C" {
1861    pub fn fluid_default_log_function(
1862        level: ::std::os::raw::c_int,
1863        message: *mut ::std::os::raw::c_char,
1864        data: *mut ::std::os::raw::c_void,
1865    );
1866}
1867extern "C" {
1868    pub fn fluid_log(
1869        level: ::std::os::raw::c_int,
1870        fmt: *mut ::std::os::raw::c_char,
1871        ...
1872    ) -> ::std::os::raw::c_int;
1873}
1874extern "C" {
1875    #[doc = " fluid_is_soundfont returns 1 if the specified filename is a"]
1876    #[doc = " soundfont. It retuns 0 otherwise. The current implementation only"]
1877    #[doc = " checks for the \"RIFF\" header in the file. It is useful only to"]
1878    #[doc = " distinguish between SoundFonts and MIDI files."]
1879    pub fn fluid_is_soundfont(filename: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1880}
1881extern "C" {
1882    #[doc = " fluid_is_midifile returns 1 if the specified filename is a MIDI"]
1883    #[doc = " file. It retuns 0 otherwise. The current implementation only checks"]
1884    #[doc = " for the \"MThd\" header in the file."]
1885    pub fn fluid_is_midifile(filename: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1886}
1887#[repr(C)]
1888#[derive(Debug, Copy, Clone)]
1889pub struct _fluid_mod_t {
1890    pub dest: ::std::os::raw::c_uchar,
1891    pub src1: ::std::os::raw::c_uchar,
1892    pub flags1: ::std::os::raw::c_uchar,
1893    pub src2: ::std::os::raw::c_uchar,
1894    pub flags2: ::std::os::raw::c_uchar,
1895    pub amount: f64,
1896    pub next: *mut fluid_mod_t,
1897}
1898#[test]
1899fn bindgen_test_layout__fluid_mod_t() {
1900    assert_eq!(
1901        ::std::mem::size_of::<_fluid_mod_t>(),
1902        24usize,
1903        concat!("Size of: ", stringify!(_fluid_mod_t))
1904    );
1905    assert_eq!(
1906        ::std::mem::align_of::<_fluid_mod_t>(),
1907        8usize,
1908        concat!("Alignment of ", stringify!(_fluid_mod_t))
1909    );
1910    assert_eq!(
1911        unsafe { &(*(::std::ptr::null::<_fluid_mod_t>())).dest as *const _ as usize },
1912        0usize,
1913        concat!(
1914            "Offset of field: ",
1915            stringify!(_fluid_mod_t),
1916            "::",
1917            stringify!(dest)
1918        )
1919    );
1920    assert_eq!(
1921        unsafe { &(*(::std::ptr::null::<_fluid_mod_t>())).src1 as *const _ as usize },
1922        1usize,
1923        concat!(
1924            "Offset of field: ",
1925            stringify!(_fluid_mod_t),
1926            "::",
1927            stringify!(src1)
1928        )
1929    );
1930    assert_eq!(
1931        unsafe { &(*(::std::ptr::null::<_fluid_mod_t>())).flags1 as *const _ as usize },
1932        2usize,
1933        concat!(
1934            "Offset of field: ",
1935            stringify!(_fluid_mod_t),
1936            "::",
1937            stringify!(flags1)
1938        )
1939    );
1940    assert_eq!(
1941        unsafe { &(*(::std::ptr::null::<_fluid_mod_t>())).src2 as *const _ as usize },
1942        3usize,
1943        concat!(
1944            "Offset of field: ",
1945            stringify!(_fluid_mod_t),
1946            "::",
1947            stringify!(src2)
1948        )
1949    );
1950    assert_eq!(
1951        unsafe { &(*(::std::ptr::null::<_fluid_mod_t>())).flags2 as *const _ as usize },
1952        4usize,
1953        concat!(
1954            "Offset of field: ",
1955            stringify!(_fluid_mod_t),
1956            "::",
1957            stringify!(flags2)
1958        )
1959    );
1960    assert_eq!(
1961        unsafe { &(*(::std::ptr::null::<_fluid_mod_t>())).amount as *const _ as usize },
1962        8usize,
1963        concat!(
1964            "Offset of field: ",
1965            stringify!(_fluid_mod_t),
1966            "::",
1967            stringify!(amount)
1968        )
1969    );
1970    assert_eq!(
1971        unsafe { &(*(::std::ptr::null::<_fluid_mod_t>())).next as *const _ as usize },
1972        16usize,
1973        concat!(
1974            "Offset of field: ",
1975            stringify!(_fluid_mod_t),
1976            "::",
1977            stringify!(next)
1978        )
1979    );
1980}
1981pub const fluid_mod_flags_FLUID_MOD_POSITIVE: fluid_mod_flags = 0;
1982pub const fluid_mod_flags_FLUID_MOD_NEGATIVE: fluid_mod_flags = 1;
1983pub const fluid_mod_flags_FLUID_MOD_UNIPOLAR: fluid_mod_flags = 0;
1984pub const fluid_mod_flags_FLUID_MOD_BIPOLAR: fluid_mod_flags = 2;
1985pub const fluid_mod_flags_FLUID_MOD_LINEAR: fluid_mod_flags = 0;
1986pub const fluid_mod_flags_FLUID_MOD_CONCAVE: fluid_mod_flags = 4;
1987pub const fluid_mod_flags_FLUID_MOD_CONVEX: fluid_mod_flags = 8;
1988pub const fluid_mod_flags_FLUID_MOD_SWITCH: fluid_mod_flags = 12;
1989pub const fluid_mod_flags_FLUID_MOD_GC: fluid_mod_flags = 0;
1990pub const fluid_mod_flags_FLUID_MOD_CC: fluid_mod_flags = 16;
1991pub type fluid_mod_flags = ::std::os::raw::c_uint;
1992pub const fluid_mod_src_FLUID_MOD_NONE: fluid_mod_src = 0;
1993pub const fluid_mod_src_FLUID_MOD_VELOCITY: fluid_mod_src = 2;
1994pub const fluid_mod_src_FLUID_MOD_KEY: fluid_mod_src = 3;
1995pub const fluid_mod_src_FLUID_MOD_KEYPRESSURE: fluid_mod_src = 10;
1996pub const fluid_mod_src_FLUID_MOD_CHANNELPRESSURE: fluid_mod_src = 13;
1997pub const fluid_mod_src_FLUID_MOD_PITCHWHEEL: fluid_mod_src = 14;
1998pub const fluid_mod_src_FLUID_MOD_PITCHWHEELSENS: fluid_mod_src = 16;
1999pub type fluid_mod_src = ::std::os::raw::c_uint;
2000extern "C" {
2001    pub fn fluid_mod_new() -> *mut fluid_mod_t;
2002}
2003extern "C" {
2004    pub fn fluid_mod_delete(mod_: *mut fluid_mod_t);
2005}
2006extern "C" {
2007    pub fn fluid_mod_set_source1(
2008        mod_: *mut fluid_mod_t,
2009        src: ::std::os::raw::c_int,
2010        flags: ::std::os::raw::c_int,
2011    );
2012}
2013extern "C" {
2014    pub fn fluid_mod_set_source2(
2015        mod_: *mut fluid_mod_t,
2016        src: ::std::os::raw::c_int,
2017        flags: ::std::os::raw::c_int,
2018    );
2019}
2020extern "C" {
2021    pub fn fluid_mod_set_dest(mod_: *mut fluid_mod_t, dst: ::std::os::raw::c_int);
2022}
2023extern "C" {
2024    pub fn fluid_mod_set_amount(mod_: *mut fluid_mod_t, amount: f64);
2025}
2026extern "C" {
2027    pub fn fluid_mod_get_source1(mod_: *mut fluid_mod_t) -> ::std::os::raw::c_int;
2028}
2029extern "C" {
2030    pub fn fluid_mod_get_flags1(mod_: *mut fluid_mod_t) -> ::std::os::raw::c_int;
2031}
2032extern "C" {
2033    pub fn fluid_mod_get_source2(mod_: *mut fluid_mod_t) -> ::std::os::raw::c_int;
2034}
2035extern "C" {
2036    pub fn fluid_mod_get_flags2(mod_: *mut fluid_mod_t) -> ::std::os::raw::c_int;
2037}
2038extern "C" {
2039    pub fn fluid_mod_get_dest(mod_: *mut fluid_mod_t) -> ::std::os::raw::c_int;
2040}
2041extern "C" {
2042    pub fn fluid_mod_get_amount(mod_: *mut fluid_mod_t) -> f64;
2043}
2044extern "C" {
2045    pub fn fluid_mod_test_identity(
2046        mod1: *mut fluid_mod_t,
2047        mod2: *mut fluid_mod_t,
2048    ) -> ::std::os::raw::c_int;
2049}
2050#[doc = "< Sample start address offset (0-32767)"]
2051pub const fluid_gen_type_GEN_STARTADDROFS: fluid_gen_type = 0;
2052#[doc = "< Sample end address offset (-32767-0)"]
2053pub const fluid_gen_type_GEN_ENDADDROFS: fluid_gen_type = 1;
2054#[doc = "< Sample loop start address offset (-32767-32767)"]
2055pub const fluid_gen_type_GEN_STARTLOOPADDROFS: fluid_gen_type = 2;
2056#[doc = "< Sample loop end address offset (-32767-32767)"]
2057pub const fluid_gen_type_GEN_ENDLOOPADDROFS: fluid_gen_type = 3;
2058#[doc = "< Sample start address coarse offset (X 32768)"]
2059pub const fluid_gen_type_GEN_STARTADDRCOARSEOFS: fluid_gen_type = 4;
2060#[doc = "< Modulation LFO to pitch"]
2061pub const fluid_gen_type_GEN_MODLFOTOPITCH: fluid_gen_type = 5;
2062#[doc = "< Vibrato LFO to pitch"]
2063pub const fluid_gen_type_GEN_VIBLFOTOPITCH: fluid_gen_type = 6;
2064#[doc = "< Modulation envelope to pitch"]
2065pub const fluid_gen_type_GEN_MODENVTOPITCH: fluid_gen_type = 7;
2066#[doc = "< Filter cutoff"]
2067pub const fluid_gen_type_GEN_FILTERFC: fluid_gen_type = 8;
2068#[doc = "< Filter Q"]
2069pub const fluid_gen_type_GEN_FILTERQ: fluid_gen_type = 9;
2070#[doc = "< Modulation LFO to filter cutoff"]
2071pub const fluid_gen_type_GEN_MODLFOTOFILTERFC: fluid_gen_type = 10;
2072#[doc = "< Modulation envelope to filter cutoff"]
2073pub const fluid_gen_type_GEN_MODENVTOFILTERFC: fluid_gen_type = 11;
2074#[doc = "< Sample end address coarse offset (X 32768)"]
2075pub const fluid_gen_type_GEN_ENDADDRCOARSEOFS: fluid_gen_type = 12;
2076#[doc = "< Modulation LFO to volume"]
2077pub const fluid_gen_type_GEN_MODLFOTOVOL: fluid_gen_type = 13;
2078#[doc = "< Unused"]
2079pub const fluid_gen_type_GEN_UNUSED1: fluid_gen_type = 14;
2080#[doc = "< Chorus send amount"]
2081pub const fluid_gen_type_GEN_CHORUSSEND: fluid_gen_type = 15;
2082#[doc = "< Reverb send amount"]
2083pub const fluid_gen_type_GEN_REVERBSEND: fluid_gen_type = 16;
2084#[doc = "< Stereo panning"]
2085pub const fluid_gen_type_GEN_PAN: fluid_gen_type = 17;
2086#[doc = "< Unused"]
2087pub const fluid_gen_type_GEN_UNUSED2: fluid_gen_type = 18;
2088#[doc = "< Unused"]
2089pub const fluid_gen_type_GEN_UNUSED3: fluid_gen_type = 19;
2090#[doc = "< Unused"]
2091pub const fluid_gen_type_GEN_UNUSED4: fluid_gen_type = 20;
2092#[doc = "< Modulation LFO delay"]
2093pub const fluid_gen_type_GEN_MODLFODELAY: fluid_gen_type = 21;
2094#[doc = "< Modulation LFO frequency"]
2095pub const fluid_gen_type_GEN_MODLFOFREQ: fluid_gen_type = 22;
2096#[doc = "< Vibrato LFO delay"]
2097pub const fluid_gen_type_GEN_VIBLFODELAY: fluid_gen_type = 23;
2098#[doc = "< Vibrato LFO frequency"]
2099pub const fluid_gen_type_GEN_VIBLFOFREQ: fluid_gen_type = 24;
2100#[doc = "< Modulation envelope delay"]
2101pub const fluid_gen_type_GEN_MODENVDELAY: fluid_gen_type = 25;
2102#[doc = "< Modulation envelope attack"]
2103pub const fluid_gen_type_GEN_MODENVATTACK: fluid_gen_type = 26;
2104#[doc = "< Modulation envelope hold"]
2105pub const fluid_gen_type_GEN_MODENVHOLD: fluid_gen_type = 27;
2106#[doc = "< Modulation envelope decay"]
2107pub const fluid_gen_type_GEN_MODENVDECAY: fluid_gen_type = 28;
2108#[doc = "< Modulation envelope sustain"]
2109pub const fluid_gen_type_GEN_MODENVSUSTAIN: fluid_gen_type = 29;
2110#[doc = "< Modulation envelope release"]
2111pub const fluid_gen_type_GEN_MODENVRELEASE: fluid_gen_type = 30;
2112#[doc = "< Key to modulation envelope hold"]
2113pub const fluid_gen_type_GEN_KEYTOMODENVHOLD: fluid_gen_type = 31;
2114#[doc = "< Key to modulation envelope decay"]
2115pub const fluid_gen_type_GEN_KEYTOMODENVDECAY: fluid_gen_type = 32;
2116#[doc = "< Volume envelope delay"]
2117pub const fluid_gen_type_GEN_VOLENVDELAY: fluid_gen_type = 33;
2118#[doc = "< Volume envelope attack"]
2119pub const fluid_gen_type_GEN_VOLENVATTACK: fluid_gen_type = 34;
2120#[doc = "< Volume envelope hold"]
2121pub const fluid_gen_type_GEN_VOLENVHOLD: fluid_gen_type = 35;
2122#[doc = "< Volume envelope decay"]
2123pub const fluid_gen_type_GEN_VOLENVDECAY: fluid_gen_type = 36;
2124#[doc = "< Volume envelope sustain"]
2125pub const fluid_gen_type_GEN_VOLENVSUSTAIN: fluid_gen_type = 37;
2126#[doc = "< Volume envelope release"]
2127pub const fluid_gen_type_GEN_VOLENVRELEASE: fluid_gen_type = 38;
2128#[doc = "< Key to volume envelope hold"]
2129pub const fluid_gen_type_GEN_KEYTOVOLENVHOLD: fluid_gen_type = 39;
2130#[doc = "< Key to volume envelope decay"]
2131pub const fluid_gen_type_GEN_KEYTOVOLENVDECAY: fluid_gen_type = 40;
2132#[doc = "< Instrument ID (shouldn't be set by user)"]
2133pub const fluid_gen_type_GEN_INSTRUMENT: fluid_gen_type = 41;
2134#[doc = "< Reserved"]
2135pub const fluid_gen_type_GEN_RESERVED1: fluid_gen_type = 42;
2136#[doc = "< MIDI note range"]
2137pub const fluid_gen_type_GEN_KEYRANGE: fluid_gen_type = 43;
2138#[doc = "< MIDI velocity range"]
2139pub const fluid_gen_type_GEN_VELRANGE: fluid_gen_type = 44;
2140#[doc = "< Sample start loop address coarse offset (X 32768)"]
2141pub const fluid_gen_type_GEN_STARTLOOPADDRCOARSEOFS: fluid_gen_type = 45;
2142#[doc = "< Fixed MIDI note number"]
2143pub const fluid_gen_type_GEN_KEYNUM: fluid_gen_type = 46;
2144#[doc = "< Fixed MIDI velocity value"]
2145pub const fluid_gen_type_GEN_VELOCITY: fluid_gen_type = 47;
2146#[doc = "< Initial volume attenuation"]
2147pub const fluid_gen_type_GEN_ATTENUATION: fluid_gen_type = 48;
2148#[doc = "< Reserved"]
2149pub const fluid_gen_type_GEN_RESERVED2: fluid_gen_type = 49;
2150#[doc = "< Sample end loop address coarse offset (X 32768)"]
2151pub const fluid_gen_type_GEN_ENDLOOPADDRCOARSEOFS: fluid_gen_type = 50;
2152#[doc = "< Coarse tuning"]
2153pub const fluid_gen_type_GEN_COARSETUNE: fluid_gen_type = 51;
2154#[doc = "< Fine tuning"]
2155pub const fluid_gen_type_GEN_FINETUNE: fluid_gen_type = 52;
2156#[doc = "< Sample ID (shouldn't be set by user)"]
2157pub const fluid_gen_type_GEN_SAMPLEID: fluid_gen_type = 53;
2158#[doc = "< Sample mode flags"]
2159pub const fluid_gen_type_GEN_SAMPLEMODE: fluid_gen_type = 54;
2160#[doc = "< Reserved"]
2161pub const fluid_gen_type_GEN_RESERVED3: fluid_gen_type = 55;
2162#[doc = "< Scale tuning"]
2163pub const fluid_gen_type_GEN_SCALETUNE: fluid_gen_type = 56;
2164#[doc = "< Exclusive class number"]
2165pub const fluid_gen_type_GEN_EXCLUSIVECLASS: fluid_gen_type = 57;
2166#[doc = "< Sample root note override"]
2167pub const fluid_gen_type_GEN_OVERRIDEROOTKEY: fluid_gen_type = 58;
2168#[doc = "< Pitch (NOTE: Not a real SoundFont generator)"]
2169pub const fluid_gen_type_GEN_PITCH: fluid_gen_type = 59;
2170#[doc = "< Value defines the count of generators (#fluid_gen_type)"]
2171pub const fluid_gen_type_GEN_LAST: fluid_gen_type = 60;
2172#[doc = " Generator (effect) numbers (Soundfont 2.01 specifications section 8.1.3)"]
2173pub type fluid_gen_type = ::std::os::raw::c_uint;
2174#[doc = " SoundFont generator structure."]
2175#[repr(C)]
2176#[derive(Debug, Copy, Clone)]
2177pub struct _fluid_gen_t {
2178    #[doc = "< Is the generator set or not (#fluid_gen_flags)"]
2179    pub flags: ::std::os::raw::c_uchar,
2180    #[doc = "< The nominal value"]
2181    pub val: f64,
2182    #[doc = "< Change by modulators"]
2183    pub mod_: f64,
2184    #[doc = "< Change by NRPN messages"]
2185    pub nrpn: f64,
2186}
2187#[test]
2188fn bindgen_test_layout__fluid_gen_t() {
2189    assert_eq!(
2190        ::std::mem::size_of::<_fluid_gen_t>(),
2191        32usize,
2192        concat!("Size of: ", stringify!(_fluid_gen_t))
2193    );
2194    assert_eq!(
2195        ::std::mem::align_of::<_fluid_gen_t>(),
2196        8usize,
2197        concat!("Alignment of ", stringify!(_fluid_gen_t))
2198    );
2199    assert_eq!(
2200        unsafe { &(*(::std::ptr::null::<_fluid_gen_t>())).flags as *const _ as usize },
2201        0usize,
2202        concat!(
2203            "Offset of field: ",
2204            stringify!(_fluid_gen_t),
2205            "::",
2206            stringify!(flags)
2207        )
2208    );
2209    assert_eq!(
2210        unsafe { &(*(::std::ptr::null::<_fluid_gen_t>())).val as *const _ as usize },
2211        8usize,
2212        concat!(
2213            "Offset of field: ",
2214            stringify!(_fluid_gen_t),
2215            "::",
2216            stringify!(val)
2217        )
2218    );
2219    assert_eq!(
2220        unsafe { &(*(::std::ptr::null::<_fluid_gen_t>())).mod_ as *const _ as usize },
2221        16usize,
2222        concat!(
2223            "Offset of field: ",
2224            stringify!(_fluid_gen_t),
2225            "::",
2226            stringify!(mod_)
2227        )
2228    );
2229    assert_eq!(
2230        unsafe { &(*(::std::ptr::null::<_fluid_gen_t>())).nrpn as *const _ as usize },
2231        24usize,
2232        concat!(
2233            "Offset of field: ",
2234            stringify!(_fluid_gen_t),
2235            "::",
2236            stringify!(nrpn)
2237        )
2238    );
2239}
2240#[doc = " SoundFont generator structure."]
2241pub type fluid_gen_t = _fluid_gen_t;
2242#[doc = "< Generator value is not set"]
2243pub const fluid_gen_flags_GEN_UNUSED: fluid_gen_flags = 0;
2244#[doc = "< Generator value is set"]
2245pub const fluid_gen_flags_GEN_SET: fluid_gen_flags = 1;
2246#[doc = "< DOCME"]
2247pub const fluid_gen_flags_GEN_ABS_NRPN: fluid_gen_flags = 2;
2248#[doc = " Enum value for 'flags' field of #_fluid_gen_t (not really flags)."]
2249pub type fluid_gen_flags = ::std::os::raw::c_uint;
2250extern "C" {
2251    pub fn fluid_gen_set_default_values(gen: *mut fluid_gen_t) -> ::std::os::raw::c_int;
2252}
2253extern "C" {
2254    #[doc = " Update all the synthesis parameters, which depend on generator gen."]
2255    #[doc = "This is only necessary after changing a generator of an already operating voice."]
2256    #[doc = "Most applications will not need this function."]
2257    pub fn fluid_voice_update_param(voice: *mut fluid_voice_t, gen: ::std::os::raw::c_int);
2258}
2259pub const fluid_voice_add_mod_FLUID_VOICE_OVERWRITE: fluid_voice_add_mod = 0;
2260pub const fluid_voice_add_mod_FLUID_VOICE_ADD: fluid_voice_add_mod = 1;
2261pub const fluid_voice_add_mod_FLUID_VOICE_DEFAULT: fluid_voice_add_mod = 2;
2262pub type fluid_voice_add_mod = ::std::os::raw::c_uint;
2263extern "C" {
2264    pub fn fluid_voice_add_mod(
2265        voice: *mut fluid_voice_t,
2266        mod_: *mut fluid_mod_t,
2267        mode: ::std::os::raw::c_int,
2268    );
2269}
2270extern "C" {
2271    #[doc = " Set the value of a generator"]
2272    pub fn fluid_voice_gen_set(voice: *mut fluid_voice_t, gen: ::std::os::raw::c_int, val: f32);
2273}
2274extern "C" {
2275    #[doc = " Get the value of a generator"]
2276    pub fn fluid_voice_gen_get(voice: *mut fluid_voice_t, gen: ::std::os::raw::c_int) -> f32;
2277}
2278extern "C" {
2279    #[doc = " Modify the value of a generator by val"]
2280    pub fn fluid_voice_gen_incr(voice: *mut fluid_voice_t, gen: ::std::os::raw::c_int, val: f32);
2281}
2282extern "C" {
2283    #[doc = " Return the unique ID of the noteon-event. A sound font loader"]
2284    #[doc = "  may store the voice processes it has created for * real-time"]
2285    #[doc = "  control during the operation of a voice (for example: parameter"]
2286    #[doc = "  changes in sound font editor). The synth uses a pool of"]
2287    #[doc = "  voices, which are 'recycled' and never deallocated."]
2288    #[doc = ""]
2289    #[doc = " Before modifying an existing voice, check"]
2290    #[doc = " - that its state is still 'playing'"]
2291    #[doc = " - that the ID is still the same"]
2292    #[doc = " Otherwise the voice has finished playing."]
2293    pub fn fluid_voice_get_id(voice: *mut fluid_voice_t) -> ::std::os::raw::c_uint;
2294}
2295extern "C" {
2296    pub fn fluid_voice_is_playing(voice: *mut fluid_voice_t) -> ::std::os::raw::c_int;
2297}
2298extern "C" {
2299    #[doc = " If the peak volume during the loop is known, then the voice can"]
2300    #[doc = " be released earlier during the release phase. Otherwise, the"]
2301    #[doc = " voice will operate (inaudibly), until the envelope is at the"]
2302    #[doc = " nominal turnoff point. In many cases the loop volume is many dB"]
2303    #[doc = " below the maximum volume.  For example, the loop volume for a"]
2304    #[doc = " typical acoustic piano is 20 dB below max.  Taking that into"]
2305    #[doc = " account in the turn-off algorithm we can save 20 dB / 100 dB =>"]
2306    #[doc = " 1/5 of the total release time."]
2307    #[doc = " So it's a good idea to call fluid_voice_optimize_sample"]
2308    #[doc = " on each sample once."]
2309    pub fn fluid_voice_optimize_sample(s: *mut fluid_sample_t) -> ::std::os::raw::c_int;
2310}
2311extern "C" {
2312    pub fn fluid_version(
2313        major: *mut ::std::os::raw::c_int,
2314        minor: *mut ::std::os::raw::c_int,
2315        micro: *mut ::std::os::raw::c_int,
2316    );
2317}
2318extern "C" {
2319    pub fn fluid_version_str() -> *mut ::std::os::raw::c_char;
2320}