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
/* automatically generated by rust-bindgen 0.59.2 */

pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const __bool_true_false_are_defined: u32 = 1;
pub const SOUNDIO_MAX_CHANNELS: u32 = 24;
pub const SoundIoError_SoundIoErrorNone: SoundIoError = 0;
#[doc = " Out of memory."]
pub const SoundIoError_SoundIoErrorNoMem: SoundIoError = 1;
#[doc = " The backend does not appear to be active or running."]
pub const SoundIoError_SoundIoErrorInitAudioBackend: SoundIoError = 2;
#[doc = " A system resource other than memory was not available."]
pub const SoundIoError_SoundIoErrorSystemResources: SoundIoError = 3;
#[doc = " Attempted to open a device and failed."]
pub const SoundIoError_SoundIoErrorOpeningDevice: SoundIoError = 4;
#[doc = " Attempted to open a device and failed."]
pub const SoundIoError_SoundIoErrorNoSuchDevice: SoundIoError = 5;
#[doc = " The programmer did not comply with the API."]
pub const SoundIoError_SoundIoErrorInvalid: SoundIoError = 6;
#[doc = " libsoundio was compiled without support for that backend."]
pub const SoundIoError_SoundIoErrorBackendUnavailable: SoundIoError = 7;
#[doc = " An open stream had an error that can only be recovered from by"]
#[doc = " destroying the stream and creating it again."]
pub const SoundIoError_SoundIoErrorStreaming: SoundIoError = 8;
#[doc = " Attempted to use a device with parameters it cannot support."]
pub const SoundIoError_SoundIoErrorIncompatibleDevice: SoundIoError = 9;
#[doc = " When JACK returns `JackNoSuchClient`"]
pub const SoundIoError_SoundIoErrorNoSuchClient: SoundIoError = 10;
#[doc = " Attempted to use parameters that the backend cannot support."]
pub const SoundIoError_SoundIoErrorIncompatibleBackend: SoundIoError = 11;
#[doc = " Backend server shutdown or became inactive."]
pub const SoundIoError_SoundIoErrorBackendDisconnected: SoundIoError = 12;
#[doc = " Backend server shutdown or became inactive."]
pub const SoundIoError_SoundIoErrorInterrupted: SoundIoError = 13;
#[doc = " Buffer underrun occurred."]
pub const SoundIoError_SoundIoErrorUnderflow: SoundIoError = 14;
#[doc = " Unable to convert to or from UTF-8 to the native string format."]
pub const SoundIoError_SoundIoErrorEncodingString: SoundIoError = 15;
#[doc = " See also ::soundio_strerror"]
pub type SoundIoError = ::std::os::raw::c_uint;
pub const SoundIoChannelId_SoundIoChannelIdInvalid: SoundIoChannelId = 0;
#[doc = "< First of the more commonly supported ids."]
pub const SoundIoChannelId_SoundIoChannelIdFrontLeft: SoundIoChannelId = 1;
pub const SoundIoChannelId_SoundIoChannelIdFrontRight: SoundIoChannelId = 2;
pub const SoundIoChannelId_SoundIoChannelIdFrontCenter: SoundIoChannelId = 3;
pub const SoundIoChannelId_SoundIoChannelIdLfe: SoundIoChannelId = 4;
pub const SoundIoChannelId_SoundIoChannelIdBackLeft: SoundIoChannelId = 5;
pub const SoundIoChannelId_SoundIoChannelIdBackRight: SoundIoChannelId = 6;
pub const SoundIoChannelId_SoundIoChannelIdFrontLeftCenter: SoundIoChannelId = 7;
pub const SoundIoChannelId_SoundIoChannelIdFrontRightCenter: SoundIoChannelId = 8;
pub const SoundIoChannelId_SoundIoChannelIdBackCenter: SoundIoChannelId = 9;
pub const SoundIoChannelId_SoundIoChannelIdSideLeft: SoundIoChannelId = 10;
pub const SoundIoChannelId_SoundIoChannelIdSideRight: SoundIoChannelId = 11;
pub const SoundIoChannelId_SoundIoChannelIdTopCenter: SoundIoChannelId = 12;
pub const SoundIoChannelId_SoundIoChannelIdTopFrontLeft: SoundIoChannelId = 13;
pub const SoundIoChannelId_SoundIoChannelIdTopFrontCenter: SoundIoChannelId = 14;
pub const SoundIoChannelId_SoundIoChannelIdTopFrontRight: SoundIoChannelId = 15;
pub const SoundIoChannelId_SoundIoChannelIdTopBackLeft: SoundIoChannelId = 16;
pub const SoundIoChannelId_SoundIoChannelIdTopBackCenter: SoundIoChannelId = 17;
#[doc = "< Last of the more commonly supported ids."]
pub const SoundIoChannelId_SoundIoChannelIdTopBackRight: SoundIoChannelId = 18;
#[doc = "< First of the less commonly supported ids."]
pub const SoundIoChannelId_SoundIoChannelIdBackLeftCenter: SoundIoChannelId = 19;
pub const SoundIoChannelId_SoundIoChannelIdBackRightCenter: SoundIoChannelId = 20;
pub const SoundIoChannelId_SoundIoChannelIdFrontLeftWide: SoundIoChannelId = 21;
pub const SoundIoChannelId_SoundIoChannelIdFrontRightWide: SoundIoChannelId = 22;
pub const SoundIoChannelId_SoundIoChannelIdFrontLeftHigh: SoundIoChannelId = 23;
pub const SoundIoChannelId_SoundIoChannelIdFrontCenterHigh: SoundIoChannelId = 24;
pub const SoundIoChannelId_SoundIoChannelIdFrontRightHigh: SoundIoChannelId = 25;
pub const SoundIoChannelId_SoundIoChannelIdTopFrontLeftCenter: SoundIoChannelId = 26;
pub const SoundIoChannelId_SoundIoChannelIdTopFrontRightCenter: SoundIoChannelId = 27;
pub const SoundIoChannelId_SoundIoChannelIdTopSideLeft: SoundIoChannelId = 28;
pub const SoundIoChannelId_SoundIoChannelIdTopSideRight: SoundIoChannelId = 29;
pub const SoundIoChannelId_SoundIoChannelIdLeftLfe: SoundIoChannelId = 30;
pub const SoundIoChannelId_SoundIoChannelIdRightLfe: SoundIoChannelId = 31;
pub const SoundIoChannelId_SoundIoChannelIdLfe2: SoundIoChannelId = 32;
pub const SoundIoChannelId_SoundIoChannelIdBottomCenter: SoundIoChannelId = 33;
pub const SoundIoChannelId_SoundIoChannelIdBottomLeftCenter: SoundIoChannelId = 34;
pub const SoundIoChannelId_SoundIoChannelIdBottomRightCenter: SoundIoChannelId = 35;
#[doc = " Mid/side recording"]
pub const SoundIoChannelId_SoundIoChannelIdMsMid: SoundIoChannelId = 36;
#[doc = " Mid/side recording"]
pub const SoundIoChannelId_SoundIoChannelIdMsSide: SoundIoChannelId = 37;
#[doc = " first order ambisonic channels"]
pub const SoundIoChannelId_SoundIoChannelIdAmbisonicW: SoundIoChannelId = 38;
#[doc = " first order ambisonic channels"]
pub const SoundIoChannelId_SoundIoChannelIdAmbisonicX: SoundIoChannelId = 39;
#[doc = " first order ambisonic channels"]
pub const SoundIoChannelId_SoundIoChannelIdAmbisonicY: SoundIoChannelId = 40;
#[doc = " first order ambisonic channels"]
pub const SoundIoChannelId_SoundIoChannelIdAmbisonicZ: SoundIoChannelId = 41;
#[doc = " X-Y Recording"]
pub const SoundIoChannelId_SoundIoChannelIdXyX: SoundIoChannelId = 42;
#[doc = " X-Y Recording"]
pub const SoundIoChannelId_SoundIoChannelIdXyY: SoundIoChannelId = 43;
#[doc = "< First of the \"other\" channel ids"]
pub const SoundIoChannelId_SoundIoChannelIdHeadphonesLeft: SoundIoChannelId = 44;
pub const SoundIoChannelId_SoundIoChannelIdHeadphonesRight: SoundIoChannelId = 45;
pub const SoundIoChannelId_SoundIoChannelIdClickTrack: SoundIoChannelId = 46;
pub const SoundIoChannelId_SoundIoChannelIdForeignLanguage: SoundIoChannelId = 47;
pub const SoundIoChannelId_SoundIoChannelIdHearingImpaired: SoundIoChannelId = 48;
pub const SoundIoChannelId_SoundIoChannelIdNarration: SoundIoChannelId = 49;
pub const SoundIoChannelId_SoundIoChannelIdHaptic: SoundIoChannelId = 50;
#[doc = "< Last of the \"other\" channel ids"]
pub const SoundIoChannelId_SoundIoChannelIdDialogCentricMix: SoundIoChannelId = 51;
pub const SoundIoChannelId_SoundIoChannelIdAux: SoundIoChannelId = 52;
pub const SoundIoChannelId_SoundIoChannelIdAux0: SoundIoChannelId = 53;
pub const SoundIoChannelId_SoundIoChannelIdAux1: SoundIoChannelId = 54;
pub const SoundIoChannelId_SoundIoChannelIdAux2: SoundIoChannelId = 55;
pub const SoundIoChannelId_SoundIoChannelIdAux3: SoundIoChannelId = 56;
pub const SoundIoChannelId_SoundIoChannelIdAux4: SoundIoChannelId = 57;
pub const SoundIoChannelId_SoundIoChannelIdAux5: SoundIoChannelId = 58;
pub const SoundIoChannelId_SoundIoChannelIdAux6: SoundIoChannelId = 59;
pub const SoundIoChannelId_SoundIoChannelIdAux7: SoundIoChannelId = 60;
pub const SoundIoChannelId_SoundIoChannelIdAux8: SoundIoChannelId = 61;
pub const SoundIoChannelId_SoundIoChannelIdAux9: SoundIoChannelId = 62;
pub const SoundIoChannelId_SoundIoChannelIdAux10: SoundIoChannelId = 63;
pub const SoundIoChannelId_SoundIoChannelIdAux11: SoundIoChannelId = 64;
pub const SoundIoChannelId_SoundIoChannelIdAux12: SoundIoChannelId = 65;
pub const SoundIoChannelId_SoundIoChannelIdAux13: SoundIoChannelId = 66;
pub const SoundIoChannelId_SoundIoChannelIdAux14: SoundIoChannelId = 67;
pub const SoundIoChannelId_SoundIoChannelIdAux15: SoundIoChannelId = 68;
#[doc = " Specifies where a channel is physically located."]
pub type SoundIoChannelId = ::std::os::raw::c_uint;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutIdMono: SoundIoChannelLayoutId = 0;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutIdStereo: SoundIoChannelLayoutId = 1;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId2Point1: SoundIoChannelLayoutId = 2;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId3Point0: SoundIoChannelLayoutId = 3;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId3Point0Back: SoundIoChannelLayoutId = 4;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId3Point1: SoundIoChannelLayoutId = 5;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId4Point0: SoundIoChannelLayoutId = 6;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutIdQuad: SoundIoChannelLayoutId = 7;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutIdQuadSide: SoundIoChannelLayoutId = 8;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId4Point1: SoundIoChannelLayoutId = 9;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId5Point0Back: SoundIoChannelLayoutId = 10;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId5Point0Side: SoundIoChannelLayoutId = 11;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId5Point1: SoundIoChannelLayoutId = 12;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId5Point1Back: SoundIoChannelLayoutId = 13;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId6Point0Side: SoundIoChannelLayoutId = 14;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId6Point0Front: SoundIoChannelLayoutId = 15;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutIdHexagonal: SoundIoChannelLayoutId = 16;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId6Point1: SoundIoChannelLayoutId = 17;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId6Point1Back: SoundIoChannelLayoutId = 18;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId6Point1Front: SoundIoChannelLayoutId = 19;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId7Point0: SoundIoChannelLayoutId = 20;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId7Point0Front: SoundIoChannelLayoutId = 21;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId7Point1: SoundIoChannelLayoutId = 22;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId7Point1Wide: SoundIoChannelLayoutId = 23;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutId7Point1WideBack: SoundIoChannelLayoutId = 24;
pub const SoundIoChannelLayoutId_SoundIoChannelLayoutIdOctagonal: SoundIoChannelLayoutId = 25;
#[doc = " Built-in channel layouts for convenience."]
pub type SoundIoChannelLayoutId = ::std::os::raw::c_uint;
pub const SoundIoBackend_SoundIoBackendNone: SoundIoBackend = 0;
pub const SoundIoBackend_SoundIoBackendJack: SoundIoBackend = 1;
pub const SoundIoBackend_SoundIoBackendPulseAudio: SoundIoBackend = 2;
pub const SoundIoBackend_SoundIoBackendAlsa: SoundIoBackend = 3;
pub const SoundIoBackend_SoundIoBackendCoreAudio: SoundIoBackend = 4;
pub const SoundIoBackend_SoundIoBackendWasapi: SoundIoBackend = 5;
pub const SoundIoBackend_SoundIoBackendDummy: SoundIoBackend = 6;
pub type SoundIoBackend = ::std::os::raw::c_uint;
#[doc = "< capture / recording"]
pub const SoundIoDeviceAim_SoundIoDeviceAimInput: SoundIoDeviceAim = 0;
#[doc = "< playback"]
pub const SoundIoDeviceAim_SoundIoDeviceAimOutput: SoundIoDeviceAim = 1;
pub type SoundIoDeviceAim = ::std::os::raw::c_uint;
pub const SoundIoFormat_SoundIoFormatInvalid: SoundIoFormat = 0;
#[doc = "< Signed 8 bit"]
pub const SoundIoFormat_SoundIoFormatS8: SoundIoFormat = 1;
#[doc = "< Unsigned 8 bit"]
pub const SoundIoFormat_SoundIoFormatU8: SoundIoFormat = 2;
#[doc = "< Signed 16 bit Little Endian"]
pub const SoundIoFormat_SoundIoFormatS16LE: SoundIoFormat = 3;
#[doc = "< Signed 16 bit Big Endian"]
pub const SoundIoFormat_SoundIoFormatS16BE: SoundIoFormat = 4;
#[doc = "< Unsigned 16 bit Little Endian"]
pub const SoundIoFormat_SoundIoFormatU16LE: SoundIoFormat = 5;
#[doc = "< Unsigned 16 bit Big Endian"]
pub const SoundIoFormat_SoundIoFormatU16BE: SoundIoFormat = 6;
#[doc = "< Signed 24 bit Little Endian using low three bytes in 32-bit word"]
pub const SoundIoFormat_SoundIoFormatS24LE: SoundIoFormat = 7;
#[doc = "< Signed 24 bit Big Endian using low three bytes in 32-bit word"]
pub const SoundIoFormat_SoundIoFormatS24BE: SoundIoFormat = 8;
#[doc = "< Unsigned 24 bit Little Endian using low three bytes in 32-bit word"]
pub const SoundIoFormat_SoundIoFormatU24LE: SoundIoFormat = 9;
#[doc = "< Unsigned 24 bit Big Endian using low three bytes in 32-bit word"]
pub const SoundIoFormat_SoundIoFormatU24BE: SoundIoFormat = 10;
#[doc = "< Signed 32 bit Little Endian"]
pub const SoundIoFormat_SoundIoFormatS32LE: SoundIoFormat = 11;
#[doc = "< Signed 32 bit Big Endian"]
pub const SoundIoFormat_SoundIoFormatS32BE: SoundIoFormat = 12;
#[doc = "< Unsigned 32 bit Little Endian"]
pub const SoundIoFormat_SoundIoFormatU32LE: SoundIoFormat = 13;
#[doc = "< Unsigned 32 bit Big Endian"]
pub const SoundIoFormat_SoundIoFormatU32BE: SoundIoFormat = 14;
#[doc = "< Float 32 bit Little Endian, Range -1.0 to 1.0"]
pub const SoundIoFormat_SoundIoFormatFloat32LE: SoundIoFormat = 15;
#[doc = "< Float 32 bit Big Endian, Range -1.0 to 1.0"]
pub const SoundIoFormat_SoundIoFormatFloat32BE: SoundIoFormat = 16;
#[doc = "< Float 64 bit Little Endian, Range -1.0 to 1.0"]
pub const SoundIoFormat_SoundIoFormatFloat64LE: SoundIoFormat = 17;
#[doc = "< Float 64 bit Big Endian, Range -1.0 to 1.0"]
pub const SoundIoFormat_SoundIoFormatFloat64BE: SoundIoFormat = 18;
#[doc = " For your convenience, Native Endian and Foreign Endian constants are defined"]
#[doc = " which point to the respective SoundIoFormat values."]
pub type SoundIoFormat = ::std::os::raw::c_uint;
#[doc = " The size of this struct is OK to use."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SoundIoChannelLayout {
    pub name: *const ::std::os::raw::c_char,
    pub channel_count: ::std::os::raw::c_int,
    pub channels: [SoundIoChannelId; 24usize],
}
#[test]
fn bindgen_test_layout_SoundIoChannelLayout() {
    assert_eq!(
        ::std::mem::size_of::<SoundIoChannelLayout>(),
        112usize,
        concat!("Size of: ", stringify!(SoundIoChannelLayout))
    );
    assert_eq!(
        ::std::mem::align_of::<SoundIoChannelLayout>(),
        8usize,
        concat!("Alignment of ", stringify!(SoundIoChannelLayout))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoChannelLayout>())).name as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoChannelLayout),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoChannelLayout>())).channel_count as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoChannelLayout),
            "::",
            stringify!(channel_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoChannelLayout>())).channels as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoChannelLayout),
            "::",
            stringify!(channels)
        )
    );
}
#[doc = " The size of this struct is OK to use."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SoundIoSampleRateRange {
    pub min: ::std::os::raw::c_int,
    pub max: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_SoundIoSampleRateRange() {
    assert_eq!(
        ::std::mem::size_of::<SoundIoSampleRateRange>(),
        8usize,
        concat!("Size of: ", stringify!(SoundIoSampleRateRange))
    );
    assert_eq!(
        ::std::mem::align_of::<SoundIoSampleRateRange>(),
        4usize,
        concat!("Alignment of ", stringify!(SoundIoSampleRateRange))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoSampleRateRange>())).min as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoSampleRateRange),
            "::",
            stringify!(min)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoSampleRateRange>())).max as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoSampleRateRange),
            "::",
            stringify!(max)
        )
    );
}
#[doc = " The size of this struct is OK to use."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SoundIoChannelArea {
    #[doc = " Base address of buffer."]
    pub ptr: *mut ::std::os::raw::c_char,
    #[doc = " How many bytes it takes to get from the beginning of one sample to"]
    #[doc = " the beginning of the next sample."]
    pub step: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_SoundIoChannelArea() {
    assert_eq!(
        ::std::mem::size_of::<SoundIoChannelArea>(),
        16usize,
        concat!("Size of: ", stringify!(SoundIoChannelArea))
    );
    assert_eq!(
        ::std::mem::align_of::<SoundIoChannelArea>(),
        8usize,
        concat!("Alignment of ", stringify!(SoundIoChannelArea))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoChannelArea>())).ptr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoChannelArea),
            "::",
            stringify!(ptr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoChannelArea>())).step as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoChannelArea),
            "::",
            stringify!(step)
        )
    );
}
#[doc = " The size of this struct is not part of the API or ABI."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SoundIo {
    #[doc = " Optional. Put whatever you want here. Defaults to NULL."]
    pub userdata: *mut ::std::os::raw::c_void,
    #[doc = " Optional callback. Called when the list of devices change. Only called"]
    #[doc = " during a call to ::soundio_flush_events or ::soundio_wait_events."]
    pub on_devices_change: ::std::option::Option<unsafe extern "C" fn(arg1: *mut SoundIo)>,
    #[doc = " Optional callback. Called when the backend disconnects. For example,"]
    #[doc = " when the JACK server shuts down. When this happens, listing devices"]
    #[doc = " and opening streams will always fail with"]
    #[doc = " SoundIoErrorBackendDisconnected. This callback is only called during a"]
    #[doc = " call to ::soundio_flush_events or ::soundio_wait_events."]
    #[doc = " If you do not supply a callback, the default will crash your program"]
    #[doc = " with an error message. This callback is also called when the thread"]
    #[doc = " that retrieves device information runs into an unrecoverable condition"]
    #[doc = " such as running out of memory."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorBackendDisconnected"]
    #[doc = " * #SoundIoErrorNoMem"]
    #[doc = " * #SoundIoErrorSystemResources"]
    #[doc = " * #SoundIoErrorOpeningDevice - unexpected problem accessing device"]
    #[doc = "   information"]
    pub on_backend_disconnect:
        ::std::option::Option<unsafe extern "C" fn(arg1: *mut SoundIo, err: ::std::os::raw::c_int)>,
    #[doc = " Optional callback. Called from an unknown thread that you should not use"]
    #[doc = " to call any soundio functions. You may use this to signal a condition"]
    #[doc = " variable to wake up. Called when ::soundio_wait_events would be woken up."]
    pub on_events_signal: ::std::option::Option<unsafe extern "C" fn(arg1: *mut SoundIo)>,
    #[doc = " Read-only. After calling ::soundio_connect or ::soundio_connect_backend,"]
    #[doc = " this field tells which backend is currently connected."]
    pub current_backend: SoundIoBackend,
    #[doc = " Optional: Application name."]
    #[doc = " PulseAudio uses this for \"application name\"."]
    #[doc = " JACK uses this for `client_name`."]
    #[doc = " Must not contain a colon (\":\")."]
    pub app_name: *const ::std::os::raw::c_char,
    #[doc = " Optional: Real time priority warning."]
    #[doc = " This callback is fired when making thread real-time priority failed. By"]
    #[doc = " default, it will print to stderr only the first time it is called"]
    #[doc = " a message instructing the user how to configure their system to allow"]
    #[doc = " real-time priority threads. This must be set to a function not NULL."]
    #[doc = " To silence the warning, assign this to a function that does nothing."]
    pub emit_rtprio_warning: ::std::option::Option<unsafe extern "C" fn()>,
    #[doc = " Optional: JACK info callback."]
    #[doc = " By default, libsoundio sets this to an empty function in order to"]
    #[doc = " silence stdio messages from JACK. You may override the behavior by"]
    #[doc = " setting this to `NULL` or providing your own function. This is"]
    #[doc = " registered with JACK regardless of whether ::soundio_connect_backend"]
    #[doc = " succeeds."]
    pub jack_info_callback:
        ::std::option::Option<unsafe extern "C" fn(msg: *const ::std::os::raw::c_char)>,
    #[doc = " Optional: JACK error callback."]
    #[doc = " See SoundIo::jack_info_callback"]
    pub jack_error_callback:
        ::std::option::Option<unsafe extern "C" fn(msg: *const ::std::os::raw::c_char)>,
}
#[test]
fn bindgen_test_layout_SoundIo() {
    assert_eq!(
        ::std::mem::size_of::<SoundIo>(),
        72usize,
        concat!("Size of: ", stringify!(SoundIo))
    );
    assert_eq!(
        ::std::mem::align_of::<SoundIo>(),
        8usize,
        concat!("Alignment of ", stringify!(SoundIo))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIo>())).userdata as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIo),
            "::",
            stringify!(userdata)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIo>())).on_devices_change as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIo),
            "::",
            stringify!(on_devices_change)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIo>())).on_backend_disconnect as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIo),
            "::",
            stringify!(on_backend_disconnect)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIo>())).on_events_signal as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIo),
            "::",
            stringify!(on_events_signal)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIo>())).current_backend as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIo),
            "::",
            stringify!(current_backend)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIo>())).app_name as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIo),
            "::",
            stringify!(app_name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIo>())).emit_rtprio_warning as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIo),
            "::",
            stringify!(emit_rtprio_warning)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIo>())).jack_info_callback as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIo),
            "::",
            stringify!(jack_info_callback)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIo>())).jack_error_callback as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIo),
            "::",
            stringify!(jack_error_callback)
        )
    );
}
#[doc = " The size of this struct is not part of the API or ABI."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SoundIoDevice {
    #[doc = " Read-only. Set automatically."]
    pub soundio: *mut SoundIo,
    #[doc = " A string of bytes that uniquely identifies this device."]
    #[doc = " If the same physical device supports both input and output, that makes"]
    #[doc = " one SoundIoDevice for the input and one SoundIoDevice for the output."]
    #[doc = " In this case, the id of each SoundIoDevice will be the same, and"]
    #[doc = " SoundIoDevice::aim will be different. Additionally, if the device"]
    #[doc = " supports raw mode, there may be up to four devices with the same id:"]
    #[doc = " one for each value of SoundIoDevice::is_raw and one for each value of"]
    #[doc = " SoundIoDevice::aim."]
    pub id: *mut ::std::os::raw::c_char,
    #[doc = " User-friendly UTF-8 encoded text to describe the device."]
    pub name: *mut ::std::os::raw::c_char,
    #[doc = " Tells whether this device is an input device or an output device."]
    pub aim: SoundIoDeviceAim,
    #[doc = " Channel layouts are handled similarly to SoundIoDevice::formats."]
    #[doc = " If this information is missing due to a SoundIoDevice::probe_error,"]
    #[doc = " layouts will be NULL. It's OK to modify this data, for example calling"]
    #[doc = " ::soundio_sort_channel_layouts on it."]
    #[doc = " Devices are guaranteed to have at least 1 channel layout."]
    pub layouts: *mut SoundIoChannelLayout,
    pub layout_count: ::std::os::raw::c_int,
    #[doc = " See SoundIoDevice::current_format"]
    pub current_layout: SoundIoChannelLayout,
    #[doc = " List of formats this device supports. See also"]
    #[doc = " SoundIoDevice::current_format."]
    pub formats: *mut SoundIoFormat,
    #[doc = " How many formats are available in SoundIoDevice::formats."]
    pub format_count: ::std::os::raw::c_int,
    #[doc = " A device is either a raw device or it is a virtual device that is"]
    #[doc = " provided by a software mixing service such as dmix or PulseAudio (see"]
    #[doc = " SoundIoDevice::is_raw). If it is a raw device,"]
    #[doc = " current_format is meaningless;"]
    #[doc = " the device has no current format until you open it. On the other hand,"]
    #[doc = " if it is a virtual device, current_format describes the"]
    #[doc = " destination sample format that your audio will be converted to. Or,"]
    #[doc = " if you're the lucky first application to open the device, you might"]
    #[doc = " cause the current_format to change to your format."]
    #[doc = " Generally, you want to ignore current_format and use"]
    #[doc = " whatever format is most convenient"]
    #[doc = " for you which is supported by the device, because when you are the only"]
    #[doc = " application left, the mixer might decide to switch"]
    #[doc = " current_format to yours. You can learn the supported formats via"]
    #[doc = " formats and SoundIoDevice::format_count. If this information is missing"]
    #[doc = " due to a probe error, formats will be `NULL`. If current_format is"]
    #[doc = " unavailable, it will be set to #SoundIoFormatInvalid."]
    #[doc = " Devices are guaranteed to have at least 1 format available."]
    pub current_format: SoundIoFormat,
    #[doc = " Sample rate is the number of frames per second."]
    #[doc = " Sample rate is handled very similar to SoundIoDevice::formats."]
    #[doc = " If sample rate information is missing due to a probe error, the field"]
    #[doc = " will be set to NULL."]
    #[doc = " Devices which have SoundIoDevice::probe_error set to #SoundIoErrorNone are"]
    #[doc = " guaranteed to have at least 1 sample rate available."]
    pub sample_rates: *mut SoundIoSampleRateRange,
    #[doc = " How many sample rate ranges are available in"]
    #[doc = " SoundIoDevice::sample_rates. 0 if sample rate information is missing"]
    #[doc = " due to a probe error."]
    pub sample_rate_count: ::std::os::raw::c_int,
    #[doc = " See SoundIoDevice::current_format"]
    #[doc = " 0 if sample rate information is missing due to a probe error."]
    pub sample_rate_current: ::std::os::raw::c_int,
    #[doc = " Software latency minimum in seconds. If this value is unknown or"]
    #[doc = " irrelevant, it is set to 0.0."]
    #[doc = " For PulseAudio and WASAPI this value is unknown until you open a"]
    #[doc = " stream."]
    pub software_latency_min: f64,
    #[doc = " Software latency maximum in seconds. If this value is unknown or"]
    #[doc = " irrelevant, it is set to 0.0."]
    #[doc = " For PulseAudio and WASAPI this value is unknown until you open a"]
    #[doc = " stream."]
    pub software_latency_max: f64,
    #[doc = " Software latency in seconds. If this value is unknown or"]
    #[doc = " irrelevant, it is set to 0.0."]
    #[doc = " For PulseAudio and WASAPI this value is unknown until you open a"]
    #[doc = " stream."]
    #[doc = " See SoundIoDevice::current_format"]
    pub software_latency_current: f64,
    #[doc = " Raw means that you are directly opening the hardware device and not"]
    #[doc = " going through a proxy such as dmix, PulseAudio, or JACK. When you open a"]
    #[doc = " raw device, other applications on the computer are not able to"]
    #[doc = " simultaneously access the device. Raw devices do not perform automatic"]
    #[doc = " resampling and thus tend to have fewer formats available."]
    pub is_raw: bool,
    #[doc = " Devices are reference counted. See ::soundio_device_ref and"]
    #[doc = " ::soundio_device_unref."]
    pub ref_count: ::std::os::raw::c_int,
    #[doc = " This is set to a SoundIoError representing the result of the device"]
    #[doc = " probe. Ideally this will be SoundIoErrorNone in which case all the"]
    #[doc = " fields of the device will be populated. If there is an error code here"]
    #[doc = " then information about formats, sample rates, and channel layouts might"]
    #[doc = " be missing."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorOpeningDevice"]
    #[doc = " * #SoundIoErrorNoMem"]
    pub probe_error: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_SoundIoDevice() {
    assert_eq!(
        ::std::mem::size_of::<SoundIoDevice>(),
        232usize,
        concat!("Size of: ", stringify!(SoundIoDevice))
    );
    assert_eq!(
        ::std::mem::align_of::<SoundIoDevice>(),
        8usize,
        concat!("Alignment of ", stringify!(SoundIoDevice))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).soundio as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(soundio)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).id as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).name as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).aim as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(aim)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).layouts as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(layouts)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).layout_count as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(layout_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).current_layout as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(current_layout)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).formats as *const _ as usize },
        160usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(formats)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).format_count as *const _ as usize },
        168usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(format_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).current_format as *const _ as usize },
        172usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(current_format)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).sample_rates as *const _ as usize },
        176usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(sample_rates)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).sample_rate_count as *const _ as usize },
        184usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(sample_rate_count)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoDevice>())).sample_rate_current as *const _ as usize
        },
        188usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(sample_rate_current)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoDevice>())).software_latency_min as *const _ as usize
        },
        192usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(software_latency_min)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoDevice>())).software_latency_max as *const _ as usize
        },
        200usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(software_latency_max)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoDevice>())).software_latency_current as *const _ as usize
        },
        208usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(software_latency_current)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).is_raw as *const _ as usize },
        216usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(is_raw)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).ref_count as *const _ as usize },
        220usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(ref_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoDevice>())).probe_error as *const _ as usize },
        224usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoDevice),
            "::",
            stringify!(probe_error)
        )
    );
}
#[doc = " The size of this struct is not part of the API or ABI."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SoundIoOutStream {
    #[doc = " Populated automatically when you call ::soundio_outstream_create."]
    pub device: *mut SoundIoDevice,
    #[doc = " Defaults to #SoundIoFormatFloat32NE, followed by the first one"]
    #[doc = " supported."]
    pub format: SoundIoFormat,
    #[doc = " Sample rate is the number of frames per second."]
    #[doc = " Defaults to 48000 (and then clamped into range)."]
    pub sample_rate: ::std::os::raw::c_int,
    #[doc = " Defaults to Stereo, if available, followed by the first layout"]
    #[doc = " supported."]
    pub layout: SoundIoChannelLayout,
    #[doc = " Ignoring hardware latency, this is the number of seconds it takes for"]
    #[doc = " the last sample in a full buffer to be played."]
    #[doc = " After you call ::soundio_outstream_open, this value is replaced with the"]
    #[doc = " actual software latency, as near to this value as possible."]
    #[doc = " On systems that support clearing the buffer, this defaults to a large"]
    #[doc = " latency, potentially upwards of 2 seconds, with the understanding that"]
    #[doc = " you will call ::soundio_outstream_clear_buffer when you want to reduce"]
    #[doc = " the latency to 0. On systems that do not support clearing the buffer,"]
    #[doc = " this defaults to a reasonable lower latency value."]
    #[doc = ""]
    #[doc = " On backends with high latencies (such as 2 seconds), `frame_count_min`"]
    #[doc = " will be 0, meaning you don't have to fill the entire buffer. In this"]
    #[doc = " case, the large buffer is there if you want it; you only have to fill"]
    #[doc = " as much as you want. On backends like JACK, `frame_count_min` will be"]
    #[doc = " equal to `frame_count_max` and if you don't fill that many frames, you"]
    #[doc = " will get glitches."]
    #[doc = ""]
    #[doc = " If the device has unknown software latency min and max values, you may"]
    #[doc = " still set this, but you might not get the value you requested."]
    #[doc = " For PulseAudio, if you set this value to non-default, it sets"]
    #[doc = " `PA_STREAM_ADJUST_LATENCY` and is the value used for `maxlength` and"]
    #[doc = " `tlength`."]
    #[doc = ""]
    #[doc = " For JACK, this value is always equal to"]
    #[doc = " SoundIoDevice::software_latency_current of the device."]
    pub software_latency: f64,
    #[doc = " Core Audio and WASAPI only: current output Audio Unit volume. Float, 0.0-1.0."]
    pub volume: f32,
    #[doc = " Defaults to NULL. Put whatever you want here."]
    pub userdata: *mut ::std::os::raw::c_void,
    #[doc = " In this callback, you call ::soundio_outstream_begin_write and"]
    #[doc = " ::soundio_outstream_end_write as many times as necessary to write"]
    #[doc = " at minimum `frame_count_min` frames and at maximum `frame_count_max`"]
    #[doc = " frames. `frame_count_max` will always be greater than 0. Note that you"]
    #[doc = " should write as many frames as you can; `frame_count_min` might be 0 and"]
    #[doc = " you can still get a buffer underflow if you always write"]
    #[doc = " `frame_count_min` frames."]
    #[doc = ""]
    #[doc = " For Dummy, ALSA, and PulseAudio, `frame_count_min` will be 0. For JACK"]
    #[doc = " and CoreAudio `frame_count_min` will be equal to `frame_count_max`."]
    #[doc = ""]
    #[doc = " The code in the supplied function must be suitable for real-time"]
    #[doc = " execution. That means that it cannot call functions that might block"]
    #[doc = " for a long time. This includes all I/O functions (disk, TTY, network),"]
    #[doc = " malloc, free, printf, pthread_mutex_lock, sleep, wait, poll, select,"]
    #[doc = " pthread_join, pthread_cond_wait, etc."]
    pub write_callback: ::std::option::Option<
        unsafe extern "C" fn(
            arg1: *mut SoundIoOutStream,
            frame_count_min: ::std::os::raw::c_int,
            frame_count_max: ::std::os::raw::c_int,
        ),
    >,
    #[doc = " This optional callback happens when the sound device runs out of"]
    #[doc = " buffered audio data to play. After this occurs, the outstream waits"]
    #[doc = " until the buffer is full to resume playback."]
    #[doc = " This is called from the SoundIoOutStream::write_callback thread context."]
    pub underflow_callback:
        ::std::option::Option<unsafe extern "C" fn(arg1: *mut SoundIoOutStream)>,
    #[doc = " Optional callback. `err` is always SoundIoErrorStreaming."]
    #[doc = " SoundIoErrorStreaming is an unrecoverable error. The stream is in an"]
    #[doc = " invalid state and must be destroyed."]
    #[doc = " If you do not supply error_callback, the default callback will print"]
    #[doc = " a message to stderr and then call `abort`."]
    #[doc = " This is called from the SoundIoOutStream::write_callback thread context."]
    pub error_callback: ::std::option::Option<
        unsafe extern "C" fn(arg1: *mut SoundIoOutStream, err: ::std::os::raw::c_int),
    >,
    #[doc = " Optional: Name of the stream. Defaults to \"SoundIoOutStream\""]
    #[doc = " PulseAudio uses this for the stream name."]
    #[doc = " JACK uses this for the client name of the client that connects when you"]
    #[doc = " open the stream."]
    #[doc = " WASAPI uses this for the session display name."]
    #[doc = " Must not contain a colon (\":\")."]
    pub name: *const ::std::os::raw::c_char,
    #[doc = " Optional: Hint that this output stream is nonterminal. This is used by"]
    #[doc = " JACK and it means that the output stream data originates from an input"]
    #[doc = " stream. Defaults to `false`."]
    pub non_terminal_hint: bool,
    #[doc = " computed automatically when you call ::soundio_outstream_open"]
    pub bytes_per_frame: ::std::os::raw::c_int,
    #[doc = " computed automatically when you call ::soundio_outstream_open"]
    pub bytes_per_sample: ::std::os::raw::c_int,
    #[doc = " If setting the channel layout fails for some reason, this field is set"]
    #[doc = " to an error code. Possible error codes are:"]
    #[doc = " * #SoundIoErrorIncompatibleDevice"]
    pub layout_error: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_SoundIoOutStream() {
    assert_eq!(
        ::std::mem::size_of::<SoundIoOutStream>(),
        200usize,
        concat!("Size of: ", stringify!(SoundIoOutStream))
    );
    assert_eq!(
        ::std::mem::align_of::<SoundIoOutStream>(),
        8usize,
        concat!("Alignment of ", stringify!(SoundIoOutStream))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoOutStream>())).device as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(device)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoOutStream>())).format as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(format)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoOutStream>())).sample_rate as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(sample_rate)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoOutStream>())).layout as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(layout)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoOutStream>())).software_latency as *const _ as usize
        },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(software_latency)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoOutStream>())).volume as *const _ as usize },
        136usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(volume)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoOutStream>())).userdata as *const _ as usize },
        144usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(userdata)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoOutStream>())).write_callback as *const _ as usize },
        152usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(write_callback)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoOutStream>())).underflow_callback as *const _ as usize
        },
        160usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(underflow_callback)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoOutStream>())).error_callback as *const _ as usize },
        168usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(error_callback)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoOutStream>())).name as *const _ as usize },
        176usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoOutStream>())).non_terminal_hint as *const _ as usize
        },
        184usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(non_terminal_hint)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoOutStream>())).bytes_per_frame as *const _ as usize
        },
        188usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(bytes_per_frame)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoOutStream>())).bytes_per_sample as *const _ as usize
        },
        192usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(bytes_per_sample)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoOutStream>())).layout_error as *const _ as usize },
        196usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoOutStream),
            "::",
            stringify!(layout_error)
        )
    );
}
#[doc = " The size of this struct is not part of the API or ABI."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SoundIoInStream {
    #[doc = " Populated automatically when you call ::soundio_outstream_create."]
    pub device: *mut SoundIoDevice,
    #[doc = " Defaults to #SoundIoFormatFloat32NE, followed by the first one"]
    #[doc = " supported."]
    pub format: SoundIoFormat,
    #[doc = " Sample rate is the number of frames per second."]
    #[doc = " Defaults to max(sample_rate_min, min(sample_rate_max, 48000))"]
    pub sample_rate: ::std::os::raw::c_int,
    #[doc = " Defaults to Stereo, if available, followed by the first layout"]
    #[doc = " supported."]
    pub layout: SoundIoChannelLayout,
    #[doc = " Ignoring hardware latency, this is the number of seconds it takes for a"]
    #[doc = " captured sample to become available for reading."]
    #[doc = " After you call ::soundio_instream_open, this value is replaced with the"]
    #[doc = " actual software latency, as near to this value as possible."]
    #[doc = " A higher value means less CPU usage. Defaults to a large value,"]
    #[doc = " potentially upwards of 2 seconds."]
    #[doc = " If the device has unknown software latency min and max values, you may"]
    #[doc = " still set this, but you might not get the value you requested."]
    #[doc = " For PulseAudio, if you set this value to non-default, it sets"]
    #[doc = " `PA_STREAM_ADJUST_LATENCY` and is the value used for `fragsize`."]
    #[doc = " For JACK, this value is always equal to"]
    #[doc = " SoundIoDevice::software_latency_current"]
    pub software_latency: f64,
    #[doc = " Defaults to NULL. Put whatever you want here."]
    pub userdata: *mut ::std::os::raw::c_void,
    #[doc = " In this function call ::soundio_instream_begin_read and"]
    #[doc = " ::soundio_instream_end_read as many times as necessary to read at"]
    #[doc = " minimum `frame_count_min` frames and at maximum `frame_count_max`"]
    #[doc = " frames. If you return from read_callback without having read"]
    #[doc = " `frame_count_min`, the frames will be dropped. `frame_count_max` is how"]
    #[doc = " many frames are available to read."]
    #[doc = ""]
    #[doc = " The code in the supplied function must be suitable for real-time"]
    #[doc = " execution. That means that it cannot call functions that might block"]
    #[doc = " for a long time. This includes all I/O functions (disk, TTY, network),"]
    #[doc = " malloc, free, printf, pthread_mutex_lock, sleep, wait, poll, select,"]
    #[doc = " pthread_join, pthread_cond_wait, etc."]
    pub read_callback: ::std::option::Option<
        unsafe extern "C" fn(
            arg1: *mut SoundIoInStream,
            frame_count_min: ::std::os::raw::c_int,
            frame_count_max: ::std::os::raw::c_int,
        ),
    >,
    #[doc = " This optional callback happens when the sound device buffer is full,"]
    #[doc = " yet there is more captured audio to put in it."]
    #[doc = " This is never fired for PulseAudio."]
    #[doc = " This is called from the SoundIoInStream::read_callback thread context."]
    pub overflow_callback: ::std::option::Option<unsafe extern "C" fn(arg1: *mut SoundIoInStream)>,
    #[doc = " Optional callback. `err` is always SoundIoErrorStreaming."]
    #[doc = " SoundIoErrorStreaming is an unrecoverable error. The stream is in an"]
    #[doc = " invalid state and must be destroyed."]
    #[doc = " If you do not supply `error_callback`, the default callback will print"]
    #[doc = " a message to stderr and then abort()."]
    #[doc = " This is called from the SoundIoInStream::read_callback thread context."]
    pub error_callback: ::std::option::Option<
        unsafe extern "C" fn(arg1: *mut SoundIoInStream, err: ::std::os::raw::c_int),
    >,
    #[doc = " Optional: Name of the stream. Defaults to \"SoundIoInStream\";"]
    #[doc = " PulseAudio uses this for the stream name."]
    #[doc = " JACK uses this for the client name of the client that connects when you"]
    #[doc = " open the stream."]
    #[doc = " WASAPI uses this for the session display name."]
    #[doc = " Must not contain a colon (\":\")."]
    pub name: *const ::std::os::raw::c_char,
    #[doc = " Optional: Hint that this input stream is nonterminal. This is used by"]
    #[doc = " JACK and it means that the data received by the stream will be"]
    #[doc = " passed on or made available to another stream. Defaults to `false`."]
    pub non_terminal_hint: bool,
    #[doc = " computed automatically when you call ::soundio_instream_open"]
    pub bytes_per_frame: ::std::os::raw::c_int,
    #[doc = " computed automatically when you call ::soundio_instream_open"]
    pub bytes_per_sample: ::std::os::raw::c_int,
    #[doc = " If setting the channel layout fails for some reason, this field is set"]
    #[doc = " to an error code. Possible error codes are: #SoundIoErrorIncompatibleDevice"]
    pub layout_error: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_SoundIoInStream() {
    assert_eq!(
        ::std::mem::size_of::<SoundIoInStream>(),
        192usize,
        concat!("Size of: ", stringify!(SoundIoInStream))
    );
    assert_eq!(
        ::std::mem::align_of::<SoundIoInStream>(),
        8usize,
        concat!("Alignment of ", stringify!(SoundIoInStream))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoInStream>())).device as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(device)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoInStream>())).format as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(format)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoInStream>())).sample_rate as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(sample_rate)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoInStream>())).layout as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(layout)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoInStream>())).software_latency as *const _ as usize
        },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(software_latency)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoInStream>())).userdata as *const _ as usize },
        136usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(userdata)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoInStream>())).read_callback as *const _ as usize },
        144usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(read_callback)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoInStream>())).overflow_callback as *const _ as usize
        },
        152usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(overflow_callback)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoInStream>())).error_callback as *const _ as usize },
        160usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(error_callback)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoInStream>())).name as *const _ as usize },
        168usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoInStream>())).non_terminal_hint as *const _ as usize
        },
        176usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(non_terminal_hint)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoInStream>())).bytes_per_frame as *const _ as usize },
        180usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(bytes_per_frame)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<SoundIoInStream>())).bytes_per_sample as *const _ as usize
        },
        184usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(bytes_per_sample)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SoundIoInStream>())).layout_error as *const _ as usize },
        188usize,
        concat!(
            "Offset of field: ",
            stringify!(SoundIoInStream),
            "::",
            stringify!(layout_error)
        )
    );
}
extern "C" {
    #[doc = " See also ::soundio_version_major, ::soundio_version_minor, ::soundio_version_patch"]
    pub fn soundio_version_string() -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " See also ::soundio_version_string, ::soundio_version_minor, ::soundio_version_patch"]
    pub fn soundio_version_major() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " See also ::soundio_version_major, ::soundio_version_string, ::soundio_version_patch"]
    pub fn soundio_version_minor() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " See also ::soundio_version_major, ::soundio_version_minor, ::soundio_version_string"]
    pub fn soundio_version_patch() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Create a SoundIo context. You may create multiple instances of this to"]
    #[doc = " connect to multiple backends. Sets all fields to defaults."]
    #[doc = " Returns `NULL` if and only if memory could not be allocated."]
    #[doc = " See also ::soundio_destroy"]
    pub fn soundio_create() -> *mut SoundIo;
}
extern "C" {
    pub fn soundio_destroy(soundio: *mut SoundIo);
}
extern "C" {
    #[doc = " Tries ::soundio_connect_backend on all available backends in order."]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorInvalid - already connected"]
    #[doc = " * #SoundIoErrorNoMem"]
    #[doc = " * #SoundIoErrorSystemResources"]
    #[doc = " * #SoundIoErrorNoSuchClient - when JACK returns `JackNoSuchClient`"]
    #[doc = " See also ::soundio_disconnect"]
    pub fn soundio_connect(soundio: *mut SoundIo) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Instead of calling ::soundio_connect you may call this function to try a"]
    #[doc = " specific backend."]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorInvalid - already connected or invalid backend parameter"]
    #[doc = " * #SoundIoErrorNoMem"]
    #[doc = " * #SoundIoErrorBackendUnavailable - backend was not compiled in"]
    #[doc = " * #SoundIoErrorSystemResources"]
    #[doc = " * #SoundIoErrorNoSuchClient - when JACK returns `JackNoSuchClient`"]
    #[doc = " * #SoundIoErrorInitAudioBackend - requested `backend` is not active"]
    #[doc = " * #SoundIoErrorBackendDisconnected - backend disconnected while connecting"]
    #[doc = " See also ::soundio_disconnect"]
    pub fn soundio_connect_backend(
        soundio: *mut SoundIo,
        backend: SoundIoBackend,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn soundio_disconnect(soundio: *mut SoundIo);
}
extern "C" {
    #[doc = " Get a string representation of a #SoundIoError"]
    pub fn soundio_strerror(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Get a string representation of a #SoundIoBackend"]
    pub fn soundio_backend_name(backend: SoundIoBackend) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Returns the number of available backends."]
    pub fn soundio_backend_count(soundio: *mut SoundIo) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " get the available backend at the specified index"]
    #[doc = " (0 <= index < ::soundio_backend_count)"]
    pub fn soundio_get_backend(
        soundio: *mut SoundIo,
        index: ::std::os::raw::c_int,
    ) -> SoundIoBackend;
}
extern "C" {
    #[doc = " Returns whether libsoundio was compiled with backend."]
    pub fn soundio_have_backend(backend: SoundIoBackend) -> bool;
}
extern "C" {
    #[doc = " Atomically update information for all connected devices. Note that calling"]
    #[doc = " this function merely flips a pointer; the actual work of collecting device"]
    #[doc = " information is done elsewhere. It is performant to call this function many"]
    #[doc = " times per second."]
    #[doc = ""]
    #[doc = " When you call this, the following callbacks might be called:"]
    #[doc = " * SoundIo::on_devices_change"]
    #[doc = " * SoundIo::on_backend_disconnect"]
    #[doc = " This is the only time those callbacks can be called."]
    #[doc = ""]
    #[doc = " This must be called from the same thread as the thread in which you call"]
    #[doc = " these functions:"]
    #[doc = " * ::soundio_input_device_count"]
    #[doc = " * ::soundio_output_device_count"]
    #[doc = " * ::soundio_get_input_device"]
    #[doc = " * ::soundio_get_output_device"]
    #[doc = " * ::soundio_default_input_device_index"]
    #[doc = " * ::soundio_default_output_device_index"]
    #[doc = ""]
    #[doc = " Note that if you do not care about learning about updated devices, you"]
    #[doc = " might call this function only once ever and never call"]
    #[doc = " ::soundio_wait_events."]
    pub fn soundio_flush_events(soundio: *mut SoundIo);
}
extern "C" {
    #[doc = " This function calls ::soundio_flush_events then blocks until another event"]
    #[doc = " is ready or you call ::soundio_wakeup. Be ready for spurious wakeups."]
    pub fn soundio_wait_events(soundio: *mut SoundIo);
}
extern "C" {
    #[doc = " Makes ::soundio_wait_events stop blocking."]
    pub fn soundio_wakeup(soundio: *mut SoundIo);
}
extern "C" {
    #[doc = " If necessary you can manually trigger a device rescan. Normally you will"]
    #[doc = " not ever have to call this function, as libsoundio listens to system events"]
    #[doc = " for device changes and responds to them by rescanning devices and preparing"]
    #[doc = " the new device information for you to be atomically replaced when you call"]
    #[doc = " ::soundio_flush_events. However you might run into cases where you want to"]
    #[doc = " force trigger a device rescan, for example if an ALSA device has a"]
    #[doc = " SoundIoDevice::probe_error."]
    #[doc = ""]
    #[doc = " After you call this you still have to use ::soundio_flush_events or"]
    #[doc = " ::soundio_wait_events and then wait for the"]
    #[doc = " SoundIo::on_devices_change callback."]
    #[doc = ""]
    #[doc = " This can be called from any thread context except for"]
    #[doc = " SoundIoOutStream::write_callback and SoundIoInStream::read_callback"]
    pub fn soundio_force_device_scan(soundio: *mut SoundIo);
}
extern "C" {
    #[doc = " Returns whether the channel count field and each channel id matches in"]
    #[doc = " the supplied channel layouts."]
    pub fn soundio_channel_layout_equal(
        a: *const SoundIoChannelLayout,
        b: *const SoundIoChannelLayout,
    ) -> bool;
}
extern "C" {
    pub fn soundio_get_channel_name(id: SoundIoChannelId) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Given UTF-8 encoded text which is the name of a channel such as"]
    #[doc = " \"Front Left\", \"FL\", or \"front-left\", return the corresponding"]
    #[doc = " SoundIoChannelId. Returns SoundIoChannelIdInvalid for no match."]
    pub fn soundio_parse_channel_id(
        str_: *const ::std::os::raw::c_char,
        str_len: ::std::os::raw::c_int,
    ) -> SoundIoChannelId;
}
extern "C" {
    #[doc = " Returns the number of builtin channel layouts."]
    pub fn soundio_channel_layout_builtin_count() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Returns a builtin channel layout. 0 <= `index` < ::soundio_channel_layout_builtin_count"]
    #[doc = ""]
    #[doc = " Although `index` is of type `int`, it should be a valid"]
    #[doc = " #SoundIoChannelLayoutId enum value."]
    pub fn soundio_channel_layout_get_builtin(
        index: ::std::os::raw::c_int,
    ) -> *const SoundIoChannelLayout;
}
extern "C" {
    #[doc = " Get the default builtin channel layout for the given number of channels."]
    pub fn soundio_channel_layout_get_default(
        channel_count: ::std::os::raw::c_int,
    ) -> *const SoundIoChannelLayout;
}
extern "C" {
    #[doc = " Return the index of `channel` in `layout`, or `-1` if not found."]
    pub fn soundio_channel_layout_find_channel(
        layout: *const SoundIoChannelLayout,
        channel: SoundIoChannelId,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Populates the name field of layout if it matches a builtin one."]
    #[doc = " returns whether it found a match"]
    pub fn soundio_channel_layout_detect_builtin(layout: *mut SoundIoChannelLayout) -> bool;
}
extern "C" {
    #[doc = " Iterates over preferred_layouts. Returns the first channel layout in"]
    #[doc = " preferred_layouts which matches one of the channel layouts in"]
    #[doc = " available_layouts. Returns NULL if none matches."]
    pub fn soundio_best_matching_channel_layout(
        preferred_layouts: *const SoundIoChannelLayout,
        preferred_layout_count: ::std::os::raw::c_int,
        available_layouts: *const SoundIoChannelLayout,
        available_layout_count: ::std::os::raw::c_int,
    ) -> *const SoundIoChannelLayout;
}
extern "C" {
    #[doc = " Sorts by channel count, descending."]
    pub fn soundio_sort_channel_layouts(
        layouts: *mut SoundIoChannelLayout,
        layout_count: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " Returns -1 on invalid format."]
    pub fn soundio_get_bytes_per_sample(format: SoundIoFormat) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Returns string representation of `format`."]
    pub fn soundio_format_string(format: SoundIoFormat) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Get the number of input devices."]
    #[doc = " Returns -1 if you never called ::soundio_flush_events."]
    pub fn soundio_input_device_count(soundio: *mut SoundIo) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Get the number of output devices."]
    #[doc = " Returns -1 if you never called ::soundio_flush_events."]
    pub fn soundio_output_device_count(soundio: *mut SoundIo) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Always returns a device. Call ::soundio_device_unref when done."]
    #[doc = " `index` must be 0 <= index < ::soundio_input_device_count"]
    #[doc = " Returns NULL if you never called ::soundio_flush_events or if you provide"]
    #[doc = " invalid parameter values."]
    pub fn soundio_get_input_device(
        soundio: *mut SoundIo,
        index: ::std::os::raw::c_int,
    ) -> *mut SoundIoDevice;
}
extern "C" {
    #[doc = " Always returns a device. Call ::soundio_device_unref when done."]
    #[doc = " `index` must be 0 <= index < ::soundio_output_device_count"]
    #[doc = " Returns NULL if you never called ::soundio_flush_events or if you provide"]
    #[doc = " invalid parameter values."]
    pub fn soundio_get_output_device(
        soundio: *mut SoundIo,
        index: ::std::os::raw::c_int,
    ) -> *mut SoundIoDevice;
}
extern "C" {
    #[doc = " returns the index of the default input device"]
    #[doc = " returns -1 if there are no devices or if you never called"]
    #[doc = " ::soundio_flush_events."]
    pub fn soundio_default_input_device_index(soundio: *mut SoundIo) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " returns the index of the default output device"]
    #[doc = " returns -1 if there are no devices or if you never called"]
    #[doc = " ::soundio_flush_events."]
    pub fn soundio_default_output_device_index(soundio: *mut SoundIo) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Add 1 to the reference count of `device`."]
    pub fn soundio_device_ref(device: *mut SoundIoDevice);
}
extern "C" {
    #[doc = " Remove 1 to the reference count of `device`. Clean up if it was the last"]
    #[doc = " reference."]
    pub fn soundio_device_unref(device: *mut SoundIoDevice);
}
extern "C" {
    #[doc = " Return `true` if and only if the devices have the same SoundIoDevice::id,"]
    #[doc = " SoundIoDevice::is_raw, and SoundIoDevice::aim are the same."]
    pub fn soundio_device_equal(a: *const SoundIoDevice, b: *const SoundIoDevice) -> bool;
}
extern "C" {
    #[doc = " Sorts channel layouts by channel count, descending."]
    pub fn soundio_device_sort_channel_layouts(device: *mut SoundIoDevice);
}
extern "C" {
    #[doc = " Convenience function. Returns whether `format` is included in the device's"]
    #[doc = " supported formats."]
    pub fn soundio_device_supports_format(
        device: *mut SoundIoDevice,
        format: SoundIoFormat,
    ) -> bool;
}
extern "C" {
    #[doc = " Convenience function. Returns whether `layout` is included in the device's"]
    #[doc = " supported channel layouts."]
    pub fn soundio_device_supports_layout(
        device: *mut SoundIoDevice,
        layout: *const SoundIoChannelLayout,
    ) -> bool;
}
extern "C" {
    #[doc = " Convenience function. Returns whether `sample_rate` is included in the"]
    #[doc = " device's supported sample rates."]
    pub fn soundio_device_supports_sample_rate(
        device: *mut SoundIoDevice,
        sample_rate: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[doc = " Convenience function. Returns the available sample rate nearest to"]
    #[doc = " `sample_rate`, rounding up."]
    pub fn soundio_device_nearest_sample_rate(
        device: *mut SoundIoDevice,
        sample_rate: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Allocates memory and sets defaults. Next you should fill out the struct fields"]
    #[doc = " and then call ::soundio_outstream_open. Sets all fields to defaults."]
    #[doc = " Returns `NULL` if and only if memory could not be allocated."]
    #[doc = " See also ::soundio_outstream_destroy"]
    pub fn soundio_outstream_create(device: *mut SoundIoDevice) -> *mut SoundIoOutStream;
}
extern "C" {
    #[doc = " You may not call this function from the SoundIoOutStream::write_callback thread context."]
    pub fn soundio_outstream_destroy(outstream: *mut SoundIoOutStream);
}
extern "C" {
    #[doc = " After you call this function, SoundIoOutStream::software_latency is set to"]
    #[doc = " the correct value."]
    #[doc = ""]
    #[doc = " The next thing to do is call ::soundio_outstream_start."]
    #[doc = " If this function returns an error, the outstream is in an invalid state and"]
    #[doc = " you must call ::soundio_outstream_destroy on it."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorInvalid"]
    #[doc = "   * SoundIoDevice::aim is not #SoundIoDeviceAimOutput"]
    #[doc = "   * SoundIoOutStream::format is not valid"]
    #[doc = "   * SoundIoOutStream::channel_count is greater than #SOUNDIO_MAX_CHANNELS"]
    #[doc = " * #SoundIoErrorNoMem"]
    #[doc = " * #SoundIoErrorOpeningDevice"]
    #[doc = " * #SoundIoErrorBackendDisconnected"]
    #[doc = " * #SoundIoErrorSystemResources"]
    #[doc = " * #SoundIoErrorNoSuchClient - when JACK returns `JackNoSuchClient`"]
    #[doc = " * #SoundIoErrorIncompatibleBackend - SoundIoOutStream::channel_count is"]
    #[doc = "   greater than the number of channels the backend can handle."]
    #[doc = " * #SoundIoErrorIncompatibleDevice - stream parameters requested are not"]
    #[doc = "   compatible with the chosen device."]
    pub fn soundio_outstream_open(outstream: *mut SoundIoOutStream) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " After you call this function, SoundIoOutStream::write_callback will be called."]
    #[doc = ""]
    #[doc = " This function might directly call SoundIoOutStream::write_callback."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorStreaming"]
    #[doc = " * #SoundIoErrorNoMem"]
    #[doc = " * #SoundIoErrorSystemResources"]
    #[doc = " * #SoundIoErrorBackendDisconnected"]
    pub fn soundio_outstream_start(outstream: *mut SoundIoOutStream) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Call this function when you are ready to begin writing to the device buffer."]
    #[doc = "  * `outstream` - (in) The output stream you want to write to."]
    #[doc = "  * `areas` - (out) The memory addresses you can write data to, one per"]
    #[doc = "    channel. It is OK to modify the pointers if that helps you iterate."]
    #[doc = "  * `frame_count` - (in/out) Provide the number of frames you want to write."]
    #[doc = "    Returned will be the number of frames you can actually write, which is"]
    #[doc = "    also the number of frames that will be written when you call"]
    #[doc = "    ::soundio_outstream_end_write. The value returned will always be less"]
    #[doc = "    than or equal to the value provided."]
    #[doc = " It is your responsibility to call this function exactly as many times as"]
    #[doc = " necessary to meet the `frame_count_min` and `frame_count_max` criteria from"]
    #[doc = " SoundIoOutStream::write_callback."]
    #[doc = " You must call this function only from the SoundIoOutStream::write_callback thread context."]
    #[doc = " After calling this function, write data to `areas` and then call"]
    #[doc = " ::soundio_outstream_end_write."]
    #[doc = " If this function returns an error, do not call ::soundio_outstream_end_write."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorInvalid"]
    #[doc = "   * `*frame_count` <= 0"]
    #[doc = "   * `*frame_count` < `frame_count_min` or `*frame_count` > `frame_count_max`"]
    #[doc = "   * function called too many times without respecting `frame_count_max`"]
    #[doc = " * #SoundIoErrorStreaming"]
    #[doc = " * #SoundIoErrorUnderflow - an underflow caused this call to fail. You might"]
    #[doc = "   also get a SoundIoOutStream::underflow_callback, and you might not get"]
    #[doc = "   this error code when an underflow occurs. Unlike #SoundIoErrorStreaming,"]
    #[doc = "   the outstream is still in a valid state and streaming can continue."]
    #[doc = " * #SoundIoErrorIncompatibleDevice - in rare cases it might just now"]
    #[doc = "   be discovered that the device uses non-byte-aligned access, in which"]
    #[doc = "   case this error code is returned."]
    pub fn soundio_outstream_begin_write(
        outstream: *mut SoundIoOutStream,
        areas: *mut *mut SoundIoChannelArea,
        frame_count: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Commits the write that you began with ::soundio_outstream_begin_write."]
    #[doc = " You must call this function only from the SoundIoOutStream::write_callback thread context."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorStreaming"]
    #[doc = " * #SoundIoErrorUnderflow - an underflow caused this call to fail. You might"]
    #[doc = "   also get a SoundIoOutStream::underflow_callback, and you might not get"]
    #[doc = "   this error code when an underflow occurs. Unlike #SoundIoErrorStreaming,"]
    #[doc = "   the outstream is still in a valid state and streaming can continue."]
    pub fn soundio_outstream_end_write(outstream: *mut SoundIoOutStream) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Clears the output stream buffer."]
    #[doc = " This function can be called from any thread."]
    #[doc = " This function can be called regardless of whether the outstream is paused"]
    #[doc = " or not."]
    #[doc = " Some backends do not support clearing the buffer. On these backends this"]
    #[doc = " function will return SoundIoErrorIncompatibleBackend."]
    #[doc = " Some devices do not support clearing the buffer. On these devices this"]
    #[doc = " function might return SoundIoErrorIncompatibleDevice."]
    #[doc = " Possible errors:"]
    #[doc = ""]
    #[doc = " * #SoundIoErrorStreaming"]
    #[doc = " * #SoundIoErrorIncompatibleBackend"]
    #[doc = " * #SoundIoErrorIncompatibleDevice"]
    pub fn soundio_outstream_clear_buffer(
        outstream: *mut SoundIoOutStream,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " If the underlying backend and device support pausing, this pauses the"]
    #[doc = " stream. SoundIoOutStream::write_callback may be called a few more times if"]
    #[doc = " the buffer is not full."]
    #[doc = " Pausing might put the hardware into a low power state which is ideal if your"]
    #[doc = " software is silent for some time."]
    #[doc = " This function may be called from any thread context, including"]
    #[doc = " SoundIoOutStream::write_callback."]
    #[doc = " Pausing when already paused or unpausing when already unpaused has no"]
    #[doc = " effect and returns #SoundIoErrorNone."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorBackendDisconnected"]
    #[doc = " * #SoundIoErrorStreaming"]
    #[doc = " * #SoundIoErrorIncompatibleDevice - device does not support"]
    #[doc = "   pausing/unpausing. This error code might not be returned even if the"]
    #[doc = "   device does not support pausing/unpausing."]
    #[doc = " * #SoundIoErrorIncompatibleBackend - backend does not support"]
    #[doc = "   pausing/unpausing."]
    #[doc = " * #SoundIoErrorInvalid - outstream not opened and started"]
    pub fn soundio_outstream_pause(
        outstream: *mut SoundIoOutStream,
        pause: bool,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Obtain the total number of seconds that the next frame written after the"]
    #[doc = " last frame written with ::soundio_outstream_end_write will take to become"]
    #[doc = " audible. This includes both software and hardware latency. In other words,"]
    #[doc = " if you call this function directly after calling ::soundio_outstream_end_write,"]
    #[doc = " this gives you the number of seconds that the next frame written will take"]
    #[doc = " to become audible."]
    #[doc = ""]
    #[doc = " This function must be called only from within SoundIoOutStream::write_callback."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorStreaming"]
    pub fn soundio_outstream_get_latency(
        outstream: *mut SoundIoOutStream,
        out_latency: *mut f64,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn soundio_outstream_set_volume(
        outstream: *mut SoundIoOutStream,
        volume: f64,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Allocates memory and sets defaults. Next you should fill out the struct fields"]
    #[doc = " and then call ::soundio_instream_open. Sets all fields to defaults."]
    #[doc = " Returns `NULL` if and only if memory could not be allocated."]
    #[doc = " See also ::soundio_instream_destroy"]
    pub fn soundio_instream_create(device: *mut SoundIoDevice) -> *mut SoundIoInStream;
}
extern "C" {
    #[doc = " You may not call this function from SoundIoInStream::read_callback."]
    pub fn soundio_instream_destroy(instream: *mut SoundIoInStream);
}
extern "C" {
    #[doc = " After you call this function, SoundIoInStream::software_latency is set to the correct"]
    #[doc = " value."]
    #[doc = " The next thing to do is call ::soundio_instream_start."]
    #[doc = " If this function returns an error, the instream is in an invalid state and"]
    #[doc = " you must call ::soundio_instream_destroy on it."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorInvalid"]
    #[doc = "   * device aim is not #SoundIoDeviceAimInput"]
    #[doc = "   * format is not valid"]
    #[doc = "   * requested layout channel count > #SOUNDIO_MAX_CHANNELS"]
    #[doc = " * #SoundIoErrorOpeningDevice"]
    #[doc = " * #SoundIoErrorNoMem"]
    #[doc = " * #SoundIoErrorBackendDisconnected"]
    #[doc = " * #SoundIoErrorSystemResources"]
    #[doc = " * #SoundIoErrorNoSuchClient"]
    #[doc = " * #SoundIoErrorIncompatibleBackend"]
    #[doc = " * #SoundIoErrorIncompatibleDevice"]
    pub fn soundio_instream_open(instream: *mut SoundIoInStream) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " After you call this function, SoundIoInStream::read_callback will be called."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorBackendDisconnected"]
    #[doc = " * #SoundIoErrorStreaming"]
    #[doc = " * #SoundIoErrorOpeningDevice"]
    #[doc = " * #SoundIoErrorSystemResources"]
    pub fn soundio_instream_start(instream: *mut SoundIoInStream) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Call this function when you are ready to begin reading from the device"]
    #[doc = " buffer."]
    #[doc = " * `instream` - (in) The input stream you want to read from."]
    #[doc = " * `areas` - (out) The memory addresses you can read data from. It is OK"]
    #[doc = "   to modify the pointers if that helps you iterate. There might be a \"hole\""]
    #[doc = "   in the buffer. To indicate this, `areas` will be `NULL` and `frame_count`"]
    #[doc = "   tells how big the hole is in frames."]
    #[doc = " * `frame_count` - (in/out) - Provide the number of frames you want to read;"]
    #[doc = "   returns the number of frames you can actually read. The returned value"]
    #[doc = "   will always be less than or equal to the provided value. If the provided"]
    #[doc = "   value is less than `frame_count_min` from SoundIoInStream::read_callback this function"]
    #[doc = "   returns with #SoundIoErrorInvalid."]
    #[doc = " It is your responsibility to call this function no more and no fewer than the"]
    #[doc = " correct number of times according to the `frame_count_min` and"]
    #[doc = " `frame_count_max` criteria from SoundIoInStream::read_callback."]
    #[doc = " You must call this function only from the SoundIoInStream::read_callback thread context."]
    #[doc = " After calling this function, read data from `areas` and then use"]
    #[doc = " ::soundio_instream_end_read` to actually remove the data from the buffer"]
    #[doc = " and move the read index forward. ::soundio_instream_end_read should not be"]
    #[doc = " called if the buffer is empty (`frame_count` == 0), but it should be called"]
    #[doc = " if there is a hole."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorInvalid"]
    #[doc = "   * `*frame_count` < `frame_count_min` or `*frame_count` > `frame_count_max`"]
    #[doc = " * #SoundIoErrorStreaming"]
    #[doc = " * #SoundIoErrorIncompatibleDevice - in rare cases it might just now"]
    #[doc = "   be discovered that the device uses non-byte-aligned access, in which"]
    #[doc = "   case this error code is returned."]
    pub fn soundio_instream_begin_read(
        instream: *mut SoundIoInStream,
        areas: *mut *mut SoundIoChannelArea,
        frame_count: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " This will drop all of the frames from when you called"]
    #[doc = " ::soundio_instream_begin_read."]
    #[doc = " You must call this function only from the SoundIoInStream::read_callback thread context."]
    #[doc = " You must call this function only after a successful call to"]
    #[doc = " ::soundio_instream_begin_read."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorStreaming"]
    pub fn soundio_instream_end_read(instream: *mut SoundIoInStream) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " If the underyling device supports pausing, this pauses the stream and"]
    #[doc = " prevents SoundIoInStream::read_callback from being called. Otherwise this returns"]
    #[doc = " #SoundIoErrorIncompatibleDevice."]
    #[doc = " This function may be called from any thread."]
    #[doc = " Pausing when already paused or unpausing when already unpaused has no"]
    #[doc = " effect and always returns #SoundIoErrorNone."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorBackendDisconnected"]
    #[doc = " * #SoundIoErrorStreaming"]
    #[doc = " * #SoundIoErrorIncompatibleDevice - device does not support pausing/unpausing"]
    pub fn soundio_instream_pause(
        instream: *mut SoundIoInStream,
        pause: bool,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Obtain the number of seconds that the next frame of sound being"]
    #[doc = " captured will take to arrive in the buffer, plus the amount of time that is"]
    #[doc = " represented in the buffer. This includes both software and hardware latency."]
    #[doc = ""]
    #[doc = " This function must be called only from within SoundIoInStream::read_callback."]
    #[doc = ""]
    #[doc = " Possible errors:"]
    #[doc = " * #SoundIoErrorStreaming"]
    pub fn soundio_instream_get_latency(
        instream: *mut SoundIoInStream,
        out_latency: *mut f64,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SoundIoRingBuffer {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = " A ring buffer is a single-reader single-writer lock-free fixed-size queue."]
    #[doc = " libsoundio ring buffers use memory mapping techniques to enable a"]
    #[doc = " contiguous buffer when reading or writing across the boundary of the ring"]
    #[doc = " buffer's capacity."]
    #[doc = " `requested_capacity` in bytes."]
    #[doc = " Returns `NULL` if and only if memory could not be allocated."]
    #[doc = " Use ::soundio_ring_buffer_capacity to get the actual capacity, which might"]
    #[doc = " be greater for alignment purposes."]
    #[doc = " See also ::soundio_ring_buffer_destroy"]
    pub fn soundio_ring_buffer_create(
        soundio: *mut SoundIo,
        requested_capacity: ::std::os::raw::c_int,
    ) -> *mut SoundIoRingBuffer;
}
extern "C" {
    pub fn soundio_ring_buffer_destroy(ring_buffer: *mut SoundIoRingBuffer);
}
extern "C" {
    #[doc = " When you create a ring buffer, capacity might be more than the requested"]
    #[doc = " capacity for alignment purposes. This function returns the actual capacity."]
    pub fn soundio_ring_buffer_capacity(
        ring_buffer: *mut SoundIoRingBuffer,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Do not write more than capacity."]
    pub fn soundio_ring_buffer_write_ptr(
        ring_buffer: *mut SoundIoRingBuffer,
    ) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " `count` in bytes."]
    pub fn soundio_ring_buffer_advance_write_ptr(
        ring_buffer: *mut SoundIoRingBuffer,
        count: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " Do not read more than capacity."]
    pub fn soundio_ring_buffer_read_ptr(
        ring_buffer: *mut SoundIoRingBuffer,
    ) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " `count` in bytes."]
    pub fn soundio_ring_buffer_advance_read_ptr(
        ring_buffer: *mut SoundIoRingBuffer,
        count: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " Returns how many bytes of the buffer is used, ready for reading."]
    pub fn soundio_ring_buffer_fill_count(
        ring_buffer: *mut SoundIoRingBuffer,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Returns how many bytes of the buffer is free, ready for writing."]
    pub fn soundio_ring_buffer_free_count(
        ring_buffer: *mut SoundIoRingBuffer,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Must be called by the writer."]
    pub fn soundio_ring_buffer_clear(ring_buffer: *mut SoundIoRingBuffer);
}