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