1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774
|
/*
* Copyright (c) 2007-2009 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and /or associated documentation files (the "Materials "), to
* deal in the Materials without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Materials, and to permit persons to whom the Materials are
* furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE
* MATERIALS.
*
* OpenSLES.h - OpenSL ES version 1.0.1
*
*/
/****************************************************************************/
/* NOTE: This file is a standard OpenSL ES header file and should not be */
/* modified in any way. */
/****************************************************************************/
#ifndef OPENSL_ES_H_
#define OPENSL_ES_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "OpenSLES_Platform.h"
/*****************************************************************************/
/* Common types, structures, and defines */
/*****************************************************************************/
#ifndef _KHRONOS_KEYS_
#define _KHRONOS_KEYS_
#define KHRONOS_TITLE "KhronosTitle"
#define KHRONOS_ALBUM "KhronosAlbum"
#define KHRONOS_TRACK_NUMBER "KhronosTrackNumber"
#define KHRONOS_ARTIST "KhronosArtist"
#define KHRONOS_GENRE "KhronosGenre"
#define KHRONOS_YEAR "KhronosYear"
#define KHRONOS_COMMENT "KhronosComment"
#define KHRONOS_ARTIST_URL "KhronosArtistURL"
#define KHRONOS_CONTENT_URL "KhronosContentURL"
#define KHRONOS_RATING "KhronosRating"
#define KHRONOS_ALBUM_ART "KhronosAlbumArt"
#define KHRONOS_COPYRIGHT "KhronosCopyright"
#endif
/* remap common types to SL types for clarity */
typedef sl_int8_t SLint8; /* 8 bit signed integer */
typedef sl_uint8_t SLuint8; /* 8 bit unsigned integer */
typedef sl_int16_t SLint16; /* 16 bit signed integer */
typedef sl_uint16_t SLuint16; /* 16 bit unsigned integer */
typedef sl_int32_t SLint32; /* 32 bit signed integer */
typedef sl_uint32_t SLuint32; /* 32 bit unsigned integer */
typedef SLuint32 SLboolean;
#define SL_BOOLEAN_FALSE ((SLboolean) 0x00000000)
#define SL_BOOLEAN_TRUE ((SLboolean) 0x00000001)
typedef SLuint8 SLchar; /* UTF-8 is to be used */
typedef SLint16 SLmillibel;
typedef SLuint32 SLmillisecond;
typedef SLuint32 SLmilliHertz;
typedef SLint32 SLmillimeter;
typedef SLint32 SLmillidegree;
typedef SLint16 SLpermille;
typedef SLuint32 SLmicrosecond;
typedef SLuint32 SLresult;
#define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF)
#define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1))
#define SL_MILLIHERTZ_MAX ((SLmilliHertz) 0xFFFFFFFF)
#define SL_MILLIMETER_MAX ((SLmillimeter) 0x7FFFFFFF)
/** Interface ID defined as a UUID */
typedef const struct SLInterfaceID_ {
SLuint32 time_low;
SLuint16 time_mid;
SLuint16 time_hi_and_version;
SLuint16 clock_seq;
SLuint8 node[6];
} * SLInterfaceID;
/* Forward declaration for the object interface */
struct SLObjectItf_;
typedef const struct SLObjectItf_ * const * SLObjectItf;
/* Objects ID's */
#define SL_OBJECTID_ENGINE ((SLuint32) 0x00001001)
#define SL_OBJECTID_LEDDEVICE ((SLuint32) 0x00001002)
#define SL_OBJECTID_VIBRADEVICE ((SLuint32) 0x00001003)
#define SL_OBJECTID_AUDIOPLAYER ((SLuint32) 0x00001004)
#define SL_OBJECTID_AUDIORECORDER ((SLuint32) 0x00001005)
#define SL_OBJECTID_MIDIPLAYER ((SLuint32) 0x00001006)
#define SL_OBJECTID_LISTENER ((SLuint32) 0x00001007)
#define SL_OBJECTID_3DGROUP ((SLuint32) 0x00001008)
#define SL_OBJECTID_OUTPUTMIX ((SLuint32) 0x00001009)
#define SL_OBJECTID_METADATAEXTRACTOR ((SLuint32) 0x0000100A)
/* SL Profiles */
#define SL_PROFILES_PHONE ((SLuint16) 0x0001)
#define SL_PROFILES_MUSIC ((SLuint16) 0x0002)
#define SL_PROFILES_GAME ((SLuint16) 0x0004)
/* Types of voices supported by the system */
#define SL_VOICETYPE_2D_AUDIO ((SLuint16) 0x0001)
#define SL_VOICETYPE_MIDI ((SLuint16) 0x0002)
#define SL_VOICETYPE_3D_AUDIO ((SLuint16) 0x0004)
#define SL_VOICETYPE_3D_MIDIOUTPUT ((SLuint16) 0x0008)
/* Convenient macros representing various different priority levels, for use with the SetPriority method */
#define SL_PRIORITY_LOWEST ((SLint32) (-0x7FFFFFFF-1))
#define SL_PRIORITY_VERYLOW ((SLint32) -0x60000000)
#define SL_PRIORITY_LOW ((SLint32) -0x40000000)
#define SL_PRIORITY_BELOWNORMAL ((SLint32) -0x20000000)
#define SL_PRIORITY_NORMAL ((SLint32) 0x00000000)
#define SL_PRIORITY_ABOVENORMAL ((SLint32) 0x20000000)
#define SL_PRIORITY_HIGH ((SLint32) 0x40000000)
#define SL_PRIORITY_VERYHIGH ((SLint32) 0x60000000)
#define SL_PRIORITY_HIGHEST ((SLint32) 0x7FFFFFFF)
/** These macros list the various sample formats that are possible on audio input and output devices. */
#define SL_PCMSAMPLEFORMAT_FIXED_8 ((SLuint16) 0x0008)
#define SL_PCMSAMPLEFORMAT_FIXED_16 ((SLuint16) 0x0010)
#define SL_PCMSAMPLEFORMAT_FIXED_20 ((SLuint16) 0x0014)
#define SL_PCMSAMPLEFORMAT_FIXED_24 ((SLuint16) 0x0018)
#define SL_PCMSAMPLEFORMAT_FIXED_28 ((SLuint16) 0x001C)
#define SL_PCMSAMPLEFORMAT_FIXED_32 ((SLuint16) 0x0020)
/** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */
#define SL_SAMPLINGRATE_8 ((SLuint32) 8000000)
#define SL_SAMPLINGRATE_11_025 ((SLuint32) 11025000)
#define SL_SAMPLINGRATE_12 ((SLuint32) 12000000)
#define SL_SAMPLINGRATE_16 ((SLuint32) 16000000)
#define SL_SAMPLINGRATE_22_05 ((SLuint32) 22050000)
#define SL_SAMPLINGRATE_24 ((SLuint32) 24000000)
#define SL_SAMPLINGRATE_32 ((SLuint32) 32000000)
#define SL_SAMPLINGRATE_44_1 ((SLuint32) 44100000)
#define SL_SAMPLINGRATE_48 ((SLuint32) 48000000)
#define SL_SAMPLINGRATE_64 ((SLuint32) 64000000)
#define SL_SAMPLINGRATE_88_2 ((SLuint32) 88200000)
#define SL_SAMPLINGRATE_96 ((SLuint32) 96000000)
#define SL_SAMPLINGRATE_192 ((SLuint32) 192000000)
#define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001)
#define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002)
#define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004)
#define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008)
#define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010)
#define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020)
#define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040)
#define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080)
#define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100)
#define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200)
#define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400)
#define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800)
#define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000)
#define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000)
#define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000)
#define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000)
#define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000)
#define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000)
/*****************************************************************************/
/* Errors */
/* */
/*****************************************************************************/
#define SL_RESULT_SUCCESS ((SLuint32) 0x00000000)
#define SL_RESULT_PRECONDITIONS_VIOLATED ((SLuint32) 0x00000001)
#define SL_RESULT_PARAMETER_INVALID ((SLuint32) 0x00000002)
#define SL_RESULT_MEMORY_FAILURE ((SLuint32) 0x00000003)
#define SL_RESULT_RESOURCE_ERROR ((SLuint32) 0x00000004)
#define SL_RESULT_RESOURCE_LOST ((SLuint32) 0x00000005)
#define SL_RESULT_IO_ERROR ((SLuint32) 0x00000006)
#define SL_RESULT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000007)
#define SL_RESULT_CONTENT_CORRUPTED ((SLuint32) 0x00000008)
#define SL_RESULT_CONTENT_UNSUPPORTED ((SLuint32) 0x00000009)
#define SL_RESULT_CONTENT_NOT_FOUND ((SLuint32) 0x0000000A)
#define SL_RESULT_PERMISSION_DENIED ((SLuint32) 0x0000000B)
#define SL_RESULT_FEATURE_UNSUPPORTED ((SLuint32) 0x0000000C)
#define SL_RESULT_INTERNAL_ERROR ((SLuint32) 0x0000000D)
#define SL_RESULT_UNKNOWN_ERROR ((SLuint32) 0x0000000E)
#define SL_RESULT_OPERATION_ABORTED ((SLuint32) 0x0000000F)
#define SL_RESULT_CONTROL_LOST ((SLuint32) 0x00000010)
/* Object state definitions */
#define SL_OBJECT_STATE_UNREALIZED ((SLuint32) 0x00000001)
#define SL_OBJECT_STATE_REALIZED ((SLuint32) 0x00000002)
#define SL_OBJECT_STATE_SUSPENDED ((SLuint32) 0x00000003)
/* Object event definitions */
#define SL_OBJECT_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
#define SL_OBJECT_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
#define SL_OBJECT_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
#define SL_OBJECT_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000004)
#define SL_OBJECT_EVENT_ITF_CONTROL_TAKEN ((SLuint32) 0x00000005)
#define SL_OBJECT_EVENT_ITF_CONTROL_RETURNED ((SLuint32) 0x00000006)
#define SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED ((SLuint32) 0x00000007)
/*****************************************************************************/
/* Interface definitions */
/*****************************************************************************/
/** NULL Interface */
extern SL_API const SLInterfaceID SL_IID_NULL;
/*---------------------------------------------------------------------------*/
/* Data Source and Data Sink Structures */
/*---------------------------------------------------------------------------*/
/** Data locator macros */
#define SL_DATALOCATOR_URI ((SLuint32) 0x00000001)
#define SL_DATALOCATOR_ADDRESS ((SLuint32) 0x00000002)
#define SL_DATALOCATOR_IODEVICE ((SLuint32) 0x00000003)
#define SL_DATALOCATOR_OUTPUTMIX ((SLuint32) 0x00000004)
#define SL_DATALOCATOR_RESERVED5 ((SLuint32) 0x00000005)
#define SL_DATALOCATOR_BUFFERQUEUE ((SLuint32) 0x00000006)
#define SL_DATALOCATOR_MIDIBUFFERQUEUE ((SLuint32) 0x00000007)
#define SL_DATALOCATOR_RESERVED8 ((SLuint32) 0x00000008)
/** URI-based data locator definition where locatorType must be SL_DATALOCATOR_URI*/
typedef struct SLDataLocator_URI_ {
SLuint32 locatorType;
SLchar * URI;
} SLDataLocator_URI;
/** Address-based data locator definition where locatorType must be SL_DATALOCATOR_ADDRESS*/
typedef struct SLDataLocator_Address_ {
SLuint32 locatorType;
void *pAddress;
SLuint32 length;
} SLDataLocator_Address;
/** IODevice-types */
#define SL_IODEVICE_AUDIOINPUT ((SLuint32) 0x00000001)
#define SL_IODEVICE_LEDARRAY ((SLuint32) 0x00000002)
#define SL_IODEVICE_VIBRA ((SLuint32) 0x00000003)
#define SL_IODEVICE_RESERVED4 ((SLuint32) 0x00000004)
#define SL_IODEVICE_RESERVED5 ((SLuint32) 0x00000005)
/** IODevice-based data locator definition where locatorType must be SL_DATALOCATOR_IODEVICE*/
typedef struct SLDataLocator_IODevice_ {
SLuint32 locatorType;
SLuint32 deviceType;
SLuint32 deviceID;
SLObjectItf device;
} SLDataLocator_IODevice;
/** OutputMix-based data locator definition where locatorType must be SL_DATALOCATOR_OUTPUTMIX*/
typedef struct SLDataLocator_OutputMix {
SLuint32 locatorType;
SLObjectItf outputMix;
} SLDataLocator_OutputMix;
/** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_BUFFERQUEUE*/
typedef struct SLDataLocator_BufferQueue {
SLuint32 locatorType;
SLuint32 numBuffers;
} SLDataLocator_BufferQueue;
/** MidiBufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_MIDIBUFFERQUEUE*/
typedef struct SLDataLocator_MIDIBufferQueue {
SLuint32 locatorType;
SLuint32 tpqn;
SLuint32 numBuffers;
} SLDataLocator_MIDIBufferQueue;
/** Data format defines */
#define SL_DATAFORMAT_MIME ((SLuint32) 0x00000001)
#define SL_DATAFORMAT_PCM ((SLuint32) 0x00000002)
#define SL_DATAFORMAT_RESERVED3 ((SLuint32) 0x00000003)
/** MIME-type-based data format definition where formatType must be SL_DATAFORMAT_MIME*/
typedef struct SLDataFormat_MIME_ {
SLuint32 formatType;
SLchar * mimeType;
SLuint32 containerType;
} SLDataFormat_MIME;
/* Byte order of a block of 16- or 32-bit data */
#define SL_BYTEORDER_BIGENDIAN ((SLuint32) 0x00000001)
#define SL_BYTEORDER_LITTLEENDIAN ((SLuint32) 0x00000002)
/* Container type */
#define SL_CONTAINERTYPE_UNSPECIFIED ((SLuint32) 0x00000001)
#define SL_CONTAINERTYPE_RAW ((SLuint32) 0x00000002)
#define SL_CONTAINERTYPE_ASF ((SLuint32) 0x00000003)
#define SL_CONTAINERTYPE_AVI ((SLuint32) 0x00000004)
#define SL_CONTAINERTYPE_BMP ((SLuint32) 0x00000005)
#define SL_CONTAINERTYPE_JPG ((SLuint32) 0x00000006)
#define SL_CONTAINERTYPE_JPG2000 ((SLuint32) 0x00000007)
#define SL_CONTAINERTYPE_M4A ((SLuint32) 0x00000008)
#define SL_CONTAINERTYPE_MP3 ((SLuint32) 0x00000009)
#define SL_CONTAINERTYPE_MP4 ((SLuint32) 0x0000000A)
#define SL_CONTAINERTYPE_MPEG_ES ((SLuint32) 0x0000000B)
#define SL_CONTAINERTYPE_MPEG_PS ((SLuint32) 0x0000000C)
#define SL_CONTAINERTYPE_MPEG_TS ((SLuint32) 0x0000000D)
#define SL_CONTAINERTYPE_QT ((SLuint32) 0x0000000E)
#define SL_CONTAINERTYPE_WAV ((SLuint32) 0x0000000F)
#define SL_CONTAINERTYPE_XMF_0 ((SLuint32) 0x00000010)
#define SL_CONTAINERTYPE_XMF_1 ((SLuint32) 0x00000011)
#define SL_CONTAINERTYPE_XMF_2 ((SLuint32) 0x00000012)
#define SL_CONTAINERTYPE_XMF_3 ((SLuint32) 0x00000013)
#define SL_CONTAINERTYPE_XMF_GENERIC ((SLuint32) 0x00000014)
#define SL_CONTAINERTYPE_AMR ((SLuint32) 0x00000015)
#define SL_CONTAINERTYPE_AAC ((SLuint32) 0x00000016)
#define SL_CONTAINERTYPE_3GPP ((SLuint32) 0x00000017)
#define SL_CONTAINERTYPE_3GA ((SLuint32) 0x00000018)
#define SL_CONTAINERTYPE_RM ((SLuint32) 0x00000019)
#define SL_CONTAINERTYPE_DMF ((SLuint32) 0x0000001A)
#define SL_CONTAINERTYPE_SMF ((SLuint32) 0x0000001B)
#define SL_CONTAINERTYPE_MOBILE_DLS ((SLuint32) 0x0000001C)
#define SL_CONTAINERTYPE_OGG ((SLuint32) 0x0000001D)
/** PCM-type-based data format definition where formatType must be SL_DATAFORMAT_PCM*/
typedef struct SLDataFormat_PCM_ {
SLuint32 formatType;
SLuint32 numChannels;
SLuint32 samplesPerSec;
SLuint32 bitsPerSample;
SLuint32 containerSize;
SLuint32 channelMask;
SLuint32 endianness;
} SLDataFormat_PCM;
typedef struct SLDataSource_ {
void *pLocator;
void *pFormat;
} SLDataSource;
typedef struct SLDataSink_ {
void *pLocator;
void *pFormat;
} SLDataSink;
/*---------------------------------------------------------------------------*/
/* Standard Object Interface */
/*---------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_OBJECT;
/** Object callback */
typedef void (SLAPIENTRY *slObjectCallback) (
SLObjectItf caller,
const void * pContext,
SLuint32 event,
SLresult result,
SLuint32 param,
void *pInterface
);
struct SLObjectItf_ {
SLresult (*Realize) (
SLObjectItf self,
SLboolean async
);
SLresult (*Resume) (
SLObjectItf self,
SLboolean async
);
SLresult (*GetState) (
SLObjectItf self,
SLuint32 * pState
);
SLresult (*GetInterface) (
SLObjectItf self,
const SLInterfaceID iid,
void * pInterface
);
SLresult (*RegisterCallback) (
SLObjectItf self,
slObjectCallback callback,
void * pContext
);
void (*AbortAsyncOperation) (
SLObjectItf self
);
void (*Destroy) (
SLObjectItf self
);
SLresult (*SetPriority) (
SLObjectItf self,
SLint32 priority,
SLboolean preemptable
);
SLresult (*GetPriority) (
SLObjectItf self,
SLint32 *pPriority,
SLboolean *pPreemptable
);
SLresult (*SetLossOfControlInterfaces) (
SLObjectItf self,
SLint16 numInterfaces,
SLInterfaceID * pInterfaceIDs,
SLboolean enabled
);
};
/*---------------------------------------------------------------------------*/
/* Audio IO Device capabilities interface */
/*---------------------------------------------------------------------------*/
#define SL_DEFAULTDEVICEID_AUDIOINPUT ((SLuint32) 0xFFFFFFFF)
#define SL_DEFAULTDEVICEID_AUDIOOUTPUT ((SLuint32) 0xFFFFFFFE)
#define SL_DEFAULTDEVICEID_LED ((SLuint32) 0xFFFFFFFD)
#define SL_DEFAULTDEVICEID_VIBRA ((SLuint32) 0xFFFFFFFC)
#define SL_DEFAULTDEVICEID_RESERVED1 ((SLuint32) 0xFFFFFFFB)
#define SL_DEVCONNECTION_INTEGRATED ((SLint16) 0x0001)
#define SL_DEVCONNECTION_ATTACHED_WIRED ((SLint16) 0x0100)
#define SL_DEVCONNECTION_ATTACHED_WIRELESS ((SLint16) 0x0200)
#define SL_DEVCONNECTION_NETWORK ((SLint16) 0x0400)
#define SL_DEVLOCATION_HANDSET ((SLuint16) 0x0001)
#define SL_DEVLOCATION_HEADSET ((SLuint16) 0x0002)
#define SL_DEVLOCATION_CARKIT ((SLuint16) 0x0003)
#define SL_DEVLOCATION_DOCK ((SLuint16) 0x0004)
#define SL_DEVLOCATION_REMOTE ((SLuint16) 0x0005)
/* Note: SL_DEVLOCATION_RESLTE is deprecated, use SL_DEVLOCATION_REMOTE instead. */
#define SL_DEVLOCATION_RESLTE ((SLuint16) 0x0005)
#define SL_DEVSCOPE_UNKNOWN ((SLuint16) 0x0001)
#define SL_DEVSCOPE_ENVIRONMENT ((SLuint16) 0x0002)
#define SL_DEVSCOPE_USER ((SLuint16) 0x0003)
typedef struct SLAudioInputDescriptor_ {
SLchar *deviceName;
SLint16 deviceConnection;
SLint16 deviceScope;
SLint16 deviceLocation;
SLboolean isForTelephony;
SLmilliHertz minSampleRate;
SLmilliHertz maxSampleRate;
SLboolean isFreqRangeContinuous;
SLmilliHertz *samplingRatesSupported;
SLint16 numOfSamplingRatesSupported;
SLint16 maxChannels;
} SLAudioInputDescriptor;
typedef struct SLAudioOutputDescriptor_ {
SLchar *pDeviceName;
SLint16 deviceConnection;
SLint16 deviceScope;
SLint16 deviceLocation;
SLboolean isForTelephony;
SLmilliHertz minSampleRate;
SLmilliHertz maxSampleRate;
SLboolean isFreqRangeContinuous;
SLmilliHertz *samplingRatesSupported;
SLint16 numOfSamplingRatesSupported;
SLint16 maxChannels;
} SLAudioOutputDescriptor;
extern SL_API const SLInterfaceID SL_IID_AUDIOIODEVICECAPABILITIES;
struct SLAudioIODeviceCapabilitiesItf_;
typedef const struct SLAudioIODeviceCapabilitiesItf_ * const * SLAudioIODeviceCapabilitiesItf;
typedef void (SLAPIENTRY *slAvailableAudioInputsChangedCallback) (
SLAudioIODeviceCapabilitiesItf caller,
void *pContext,
SLuint32 deviceID,
SLint32 numInputs,
SLboolean isNew
);
typedef void (SLAPIENTRY *slAvailableAudioOutputsChangedCallback) (
SLAudioIODeviceCapabilitiesItf caller,
void *pContext,
SLuint32 deviceID,
SLint32 numOutputs,
SLboolean isNew
);
typedef void (SLAPIENTRY *slDefaultDeviceIDMapChangedCallback) (
SLAudioIODeviceCapabilitiesItf caller,
void *pContext,
SLboolean isOutput,
SLint32 numDevices
);
struct SLAudioIODeviceCapabilitiesItf_ {
SLresult (*GetAvailableAudioInputs)(
SLAudioIODeviceCapabilitiesItf self,
SLint32 *pNumInputs,
SLuint32 *pInputDeviceIDs
);
SLresult (*QueryAudioInputCapabilities)(
SLAudioIODeviceCapabilitiesItf self,
SLuint32 deviceId,
SLAudioInputDescriptor *pDescriptor
);
SLresult (*RegisterAvailableAudioInputsChangedCallback) (
SLAudioIODeviceCapabilitiesItf self,
slAvailableAudioInputsChangedCallback callback,
void *pContext
);
SLresult (*GetAvailableAudioOutputs)(
SLAudioIODeviceCapabilitiesItf self,
SLint32 *pNumOutputs,
SLuint32 *pOutputDeviceIDs
);
SLresult (*QueryAudioOutputCapabilities)(
SLAudioIODeviceCapabilitiesItf self,
SLuint32 deviceId,
SLAudioOutputDescriptor *pDescriptor
);
SLresult (*RegisterAvailableAudioOutputsChangedCallback) (
SLAudioIODeviceCapabilitiesItf self,
slAvailableAudioOutputsChangedCallback callback,
void *pContext
);
SLresult (*RegisterDefaultDeviceIDMapChangedCallback) (
SLAudioIODeviceCapabilitiesItf self,
slDefaultDeviceIDMapChangedCallback callback,
void *pContext
);
SLresult (*GetAssociatedAudioInputs) (
SLAudioIODeviceCapabilitiesItf self,
SLuint32 deviceId,
SLint32 *pNumAudioInputs,
SLuint32 *pAudioInputDeviceIDs
);
SLresult (*GetAssociatedAudioOutputs) (
SLAudioIODeviceCapabilitiesItf self,
SLuint32 deviceId,
SLint32 *pNumAudioOutputs,
SLuint32 *pAudioOutputDeviceIDs
);
SLresult (*GetDefaultAudioDevices) (
SLAudioIODeviceCapabilitiesItf self,
SLuint32 defaultDeviceID,
SLint32 *pNumAudioDevices,
SLuint32 *pAudioDeviceIDs
);
SLresult (*QuerySampleFormatsSupported)(
SLAudioIODeviceCapabilitiesItf self,
SLuint32 deviceId,
SLmilliHertz samplingRate,
SLint32 *pSampleFormats,
SLint32 *pNumOfSampleFormats
);
};
/*---------------------------------------------------------------------------*/
/* Capabilities of the LED array IODevice */
/*---------------------------------------------------------------------------*/
typedef struct SLLEDDescriptor_ {
SLuint8 ledCount;
SLuint8 primaryLED;
SLuint32 colorMask;
} SLLEDDescriptor;
/*---------------------------------------------------------------------------*/
/* LED Array interface */
/*---------------------------------------------------------------------------*/
typedef struct SLHSL_ {
SLmillidegree hue;
SLpermille saturation;
SLpermille lightness;
} SLHSL;
extern SL_API const SLInterfaceID SL_IID_LED;
struct SLLEDArrayItf_;
typedef const struct SLLEDArrayItf_ * const * SLLEDArrayItf;
struct SLLEDArrayItf_ {
SLresult (*ActivateLEDArray) (
SLLEDArrayItf self,
SLuint32 lightMask
);
SLresult (*IsLEDArrayActivated) (
SLLEDArrayItf self,
SLuint32 *lightMask
);
SLresult (*SetColor) (
SLLEDArrayItf self,
SLuint8 index,
const SLHSL *color
);
SLresult (*GetColor) (
SLLEDArrayItf self,
SLuint8 index,
SLHSL *color
);
};
/*---------------------------------------------------------------------------*/
/* Capabilities of the Vibra IODevice */
/*---------------------------------------------------------------------------*/
typedef struct SLVibraDescriptor_ {
SLboolean supportsFrequency;
SLboolean supportsIntensity;
SLmilliHertz minFrequency;
SLmilliHertz maxFrequency;
} SLVibraDescriptor;
/*---------------------------------------------------------------------------*/
/* Vibra interface */
/*---------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_VIBRA;
struct SLVibraItf_;
typedef const struct SLVibraItf_ * const * SLVibraItf;
struct SLVibraItf_ {
SLresult (*Vibrate) (
SLVibraItf self,
SLboolean vibrate
);
SLresult (*IsVibrating) (
SLVibraItf self,
SLboolean *pVibrating
);
SLresult (*SetFrequency) (
SLVibraItf self,
SLmilliHertz frequency
);
SLresult (*GetFrequency) (
SLVibraItf self,
SLmilliHertz *pFrequency
);
SLresult (*SetIntensity) (
SLVibraItf self,
SLpermille intensity
);
SLresult (*GetIntensity) (
SLVibraItf self,
SLpermille *pIntensity
);
};
/*---------------------------------------------------------------------------*/
/* Meta data extraction related types and interface */
/*---------------------------------------------------------------------------*/
#define SL_CHARACTERENCODING_UNKNOWN ((SLuint32) 0x00000000)
#define SL_CHARACTERENCODING_BINARY ((SLuint32) 0x00000001)
#define SL_CHARACTERENCODING_ASCII ((SLuint32) 0x00000002)
#define SL_CHARACTERENCODING_BIG5 ((SLuint32) 0x00000003)
#define SL_CHARACTERENCODING_CODEPAGE1252 ((SLuint32) 0x00000004)
#define SL_CHARACTERENCODING_GB2312 ((SLuint32) 0x00000005)
#define SL_CHARACTERENCODING_HZGB2312 ((SLuint32) 0x00000006)
#define SL_CHARACTERENCODING_GB12345 ((SLuint32) 0x00000007)
#define SL_CHARACTERENCODING_GB18030 ((SLuint32) 0x00000008)
#define SL_CHARACTERENCODING_GBK ((SLuint32) 0x00000009)
#define SL_CHARACTERENCODING_IMAPUTF7 ((SLuint32) 0x0000000A)
#define SL_CHARACTERENCODING_ISO2022JP ((SLuint32) 0x0000000B)
#define SL_CHARACTERENCODING_ISO2022JP1 ((SLuint32) 0x0000000B)
#define SL_CHARACTERENCODING_ISO88591 ((SLuint32) 0x0000000C)
#define SL_CHARACTERENCODING_ISO885910 ((SLuint32) 0x0000000D)
#define SL_CHARACTERENCODING_ISO885913 ((SLuint32) 0x0000000E)
#define SL_CHARACTERENCODING_ISO885914 ((SLuint32) 0x0000000F)
#define SL_CHARACTERENCODING_ISO885915 ((SLuint32) 0x00000010)
#define SL_CHARACTERENCODING_ISO88592 ((SLuint32) 0x00000011)
#define SL_CHARACTERENCODING_ISO88593 ((SLuint32) 0x00000012)
#define SL_CHARACTERENCODING_ISO88594 ((SLuint32) 0x00000013)
#define SL_CHARACTERENCODING_ISO88595 ((SLuint32) 0x00000014)
#define SL_CHARACTERENCODING_ISO88596 ((SLuint32) 0x00000015)
#define SL_CHARACTERENCODING_ISO88597 ((SLuint32) 0x00000016)
#define SL_CHARACTERENCODING_ISO88598 ((SLuint32) 0x00000017)
#define SL_CHARACTERENCODING_ISO88599 ((SLuint32) 0x00000018)
#define SL_CHARACTERENCODING_ISOEUCJP ((SLuint32) 0x00000019)
#define SL_CHARACTERENCODING_SHIFTJIS ((SLuint32) 0x0000001A)
#define SL_CHARACTERENCODING_SMS7BIT ((SLuint32) 0x0000001B)
#define SL_CHARACTERENCODING_UTF7 ((SLuint32) 0x0000001C)
#define SL_CHARACTERENCODING_UTF8 ((SLuint32) 0x0000001D)
#define SL_CHARACTERENCODING_JAVACONFORMANTUTF8 ((SLuint32) 0x0000001E)
#define SL_CHARACTERENCODING_UTF16BE ((SLuint32) 0x0000001F)
#define SL_CHARACTERENCODING_UTF16LE ((SLuint32) 0x00000020)
#define SL_METADATA_FILTER_KEY ((SLuint8) 0x01)
#define SL_METADATA_FILTER_LANG ((SLuint8) 0x02)
#define SL_METADATA_FILTER_ENCODING ((SLuint8) 0x04)
typedef struct SLMetadataInfo_ {
SLuint32 size;
SLuint32 encoding;
SLchar langCountry[16];
SLuint8 data[1];
} SLMetadataInfo;
extern SL_API const SLInterfaceID SL_IID_METADATAEXTRACTION;
struct SLMetadataExtractionItf_;
typedef const struct SLMetadataExtractionItf_ * const * SLMetadataExtractionItf;
struct SLMetadataExtractionItf_ {
SLresult (*GetItemCount) (
SLMetadataExtractionItf self,
SLuint32 *pItemCount
);
SLresult (*GetKeySize) (
SLMetadataExtractionItf self,
SLuint32 index,
SLuint32 *pKeySize
);
SLresult (*GetKey) (
SLMetadataExtractionItf self,
SLuint32 index,
SLuint32 keySize,
SLMetadataInfo *pKey
);
SLresult (*GetValueSize) (
SLMetadataExtractionItf self,
SLuint32 index,
SLuint32 *pValueSize
);
SLresult (*GetValue) (
SLMetadataExtractionItf self,
SLuint32 index,
SLuint32 valueSize,
SLMetadataInfo *pValue
);
SLresult (*AddKeyFilter) (
SLMetadataExtractionItf self,
SLuint32 keySize,
const void *pKey,
SLuint32 keyEncoding,
const SLchar *pValueLangCountry,
SLuint32 valueEncoding,
SLuint8 filterMask
);
SLresult (*ClearKeyFilter) (
SLMetadataExtractionItf self
);
};
/*---------------------------------------------------------------------------*/
/* Meta data traversal related types and interface */
/*---------------------------------------------------------------------------*/
#define SL_METADATATRAVERSALMODE_ALL ((SLuint32) 0x00000001)
#define SL_METADATATRAVERSALMODE_NODE ((SLuint32) 0x00000002)
#define SL_NODETYPE_UNSPECIFIED ((SLuint32) 0x00000001)
#define SL_NODETYPE_AUDIO ((SLuint32) 0x00000002)
#define SL_NODETYPE_VIDEO ((SLuint32) 0x00000003)
#define SL_NODETYPE_IMAGE ((SLuint32) 0x00000004)
#define SL_NODE_PARENT 0xFFFFFFFF
extern SL_API const SLInterfaceID SL_IID_METADATATRAVERSAL;
struct SLMetadataTraversalItf_;
typedef const struct SLMetadataTraversalItf_ * const * SLMetadataTraversalItf;
struct SLMetadataTraversalItf_ {
SLresult (*SetMode) (
SLMetadataTraversalItf self,
SLuint32 mode
);
SLresult (*GetChildCount) (
SLMetadataTraversalItf self,
SLuint32 *pCount
);
SLresult (*GetChildMIMETypeSize) (
SLMetadataTraversalItf self,
SLuint32 index,
SLuint32 *pSize
);
SLresult (*GetChildInfo) (
SLMetadataTraversalItf self,
SLuint32 index,
SLint32 *pNodeID,
SLuint32 *pType,
SLuint32 size,
SLchar *pMimeType
);
SLresult (*SetActiveNode) (
SLMetadataTraversalItf self,
SLuint32 index
);
};
/*---------------------------------------------------------------------------*/
/* Dynamic Source types and interface */
/*---------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_DYNAMICSOURCE;
struct SLDynamicSourceItf_;
typedef const struct SLDynamicSourceItf_ * const * SLDynamicSourceItf;
struct SLDynamicSourceItf_ {
SLresult (*SetSource) (
SLDynamicSourceItf self,
SLDataSource *pDataSource
);
};
/*---------------------------------------------------------------------------*/
/* Output Mix interface */
/*---------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_OUTPUTMIX;
struct SLOutputMixItf_;
typedef const struct SLOutputMixItf_ * const * SLOutputMixItf;
typedef void (SLAPIENTRY *slMixDeviceChangeCallback) (
SLOutputMixItf caller,
void *pContext
);
struct SLOutputMixItf_ {
SLresult (*GetDestinationOutputDeviceIDs) (
SLOutputMixItf self,
SLint32 *pNumDevices,
SLuint32 *pDeviceIDs
);
SLresult (*RegisterDeviceChangeCallback) (
SLOutputMixItf self,
slMixDeviceChangeCallback callback,
void *pContext
);
SLresult (*ReRoute)(
SLOutputMixItf self,
SLint32 numOutputDevices,
SLuint32 *pOutputDeviceIDs
);
};
/*---------------------------------------------------------------------------*/
/* Playback interface */
/*---------------------------------------------------------------------------*/
/** Playback states */
#define SL_PLAYSTATE_STOPPED ((SLuint32) 0x00000001)
#define SL_PLAYSTATE_PAUSED ((SLuint32) 0x00000002)
#define SL_PLAYSTATE_PLAYING ((SLuint32) 0x00000003)
/** Play events **/
#define SL_PLAYEVENT_HEADATEND ((SLuint32) 0x00000001)
#define SL_PLAYEVENT_HEADATMARKER ((SLuint32) 0x00000002)
#define SL_PLAYEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
#define SL_PLAYEVENT_HEADMOVING ((SLuint32) 0x00000008)
#define SL_PLAYEVENT_HEADSTALLED ((SLuint32) 0x00000010)
#define SL_TIME_UNKNOWN ((SLuint32) 0xFFFFFFFF)
extern SL_API const SLInterfaceID SL_IID_PLAY;
/** Playback interface methods */
struct SLPlayItf_;
typedef const struct SLPlayItf_ * const * SLPlayItf;
typedef void (SLAPIENTRY *slPlayCallback) (
SLPlayItf caller,
void *pContext,
SLuint32 event
);
struct SLPlayItf_ {
SLresult (*SetPlayState) (
SLPlayItf self,
SLuint32 state
);
SLresult (*GetPlayState) (
SLPlayItf self,
SLuint32 *pState
);
SLresult (*GetDuration) (
SLPlayItf self,
SLmillisecond *pMsec
);
SLresult (*GetPosition) (
SLPlayItf self,
SLmillisecond *pMsec
);
SLresult (*RegisterCallback) (
SLPlayItf self,
slPlayCallback callback,
void *pContext
);
SLresult (*SetCallbackEventsMask) (
SLPlayItf self,
SLuint32 eventFlags
);
SLresult (*GetCallbackEventsMask) (
SLPlayItf self,
SLuint32 *pEventFlags
);
SLresult (*SetMarkerPosition) (
SLPlayItf self,
SLmillisecond mSec
);
SLresult (*ClearMarkerPosition) (
SLPlayItf self
);
SLresult (*GetMarkerPosition) (
SLPlayItf self,
SLmillisecond *pMsec
);
SLresult (*SetPositionUpdatePeriod) (
SLPlayItf self,
SLmillisecond mSec
);
SLresult (*GetPositionUpdatePeriod) (
SLPlayItf self,
SLmillisecond *pMsec
);
};
/*---------------------------------------------------------------------------*/
/* Prefetch status interface */
/*---------------------------------------------------------------------------*/
#define SL_PREFETCHEVENT_STATUSCHANGE ((SLuint32) 0x00000001)
#define SL_PREFETCHEVENT_FILLLEVELCHANGE ((SLuint32) 0x00000002)
#define SL_PREFETCHSTATUS_UNDERFLOW ((SLuint32) 0x00000001)
#define SL_PREFETCHSTATUS_SUFFICIENTDATA ((SLuint32) 0x00000002)
#define SL_PREFETCHSTATUS_OVERFLOW ((SLuint32) 0x00000003)
extern SL_API const SLInterfaceID SL_IID_PREFETCHSTATUS;
/** Prefetch status interface methods */
struct SLPrefetchStatusItf_;
typedef const struct SLPrefetchStatusItf_ * const * SLPrefetchStatusItf;
typedef void (SLAPIENTRY *slPrefetchCallback) (
SLPrefetchStatusItf caller,
void *pContext,
SLuint32 event
);
struct SLPrefetchStatusItf_ {
SLresult (*GetPrefetchStatus) (
SLPrefetchStatusItf self,
SLuint32 *pStatus
);
SLresult (*GetFillLevel) (
SLPrefetchStatusItf self,
SLpermille *pLevel
);
SLresult (*RegisterCallback) (
SLPrefetchStatusItf self,
slPrefetchCallback callback,
void *pContext
);
SLresult (*SetCallbackEventsMask) (
SLPrefetchStatusItf self,
SLuint32 eventFlags
);
SLresult (*GetCallbackEventsMask) (
SLPrefetchStatusItf self,
SLuint32 *pEventFlags
);
SLresult (*SetFillUpdatePeriod) (
SLPrefetchStatusItf self,
SLpermille period
);
SLresult (*GetFillUpdatePeriod) (
SLPrefetchStatusItf self,
SLpermille *pPeriod
);
};
/*---------------------------------------------------------------------------*/
/* Playback Rate interface */
/*---------------------------------------------------------------------------*/
#define SL_RATEPROP_RESERVED1 ((SLuint32) 0x00000001)
#define SL_RATEPROP_RESERVED2 ((SLuint32) 0x00000002)
#define SL_RATEPROP_SILENTAUDIO ((SLuint32) 0x00000100)
#define SL_RATEPROP_STAGGEREDAUDIO ((SLuint32) 0x00000200)
#define SL_RATEPROP_NOPITCHCORAUDIO ((SLuint32) 0x00000400)
#define SL_RATEPROP_PITCHCORAUDIO ((SLuint32) 0x00000800)
extern SL_API const SLInterfaceID SL_IID_PLAYBACKRATE;
struct SLPlaybackRateItf_;
typedef const struct SLPlaybackRateItf_ * const * SLPlaybackRateItf;
struct SLPlaybackRateItf_ {
SLresult (*SetRate)(
SLPlaybackRateItf self,
SLpermille rate
);
SLresult (*GetRate)(
SLPlaybackRateItf self,
SLpermille *pRate
);
SLresult (*SetPropertyConstraints)(
SLPlaybackRateItf self,
SLuint32 constraints
);
SLresult (*GetProperties)(
SLPlaybackRateItf self,
SLuint32 *pProperties
);
SLresult (*GetCapabilitiesOfRate)(
SLPlaybackRateItf self,
SLpermille rate,
SLuint32 *pCapabilities
);
SLresult (*GetRateRange) (
SLPlaybackRateItf self,
SLuint8 index,
SLpermille *pMinRate,
SLpermille *pMaxRate,
SLpermille *pStepSize,
SLuint32 *pCapabilities
);
};
/*---------------------------------------------------------------------------*/
/* Seek Interface */
/*---------------------------------------------------------------------------*/
#define SL_SEEKMODE_FAST ((SLuint32) 0x0001)
#define SL_SEEKMODE_ACCURATE ((SLuint32) 0x0002)
extern SL_API const SLInterfaceID SL_IID_SEEK;
struct SLSeekItf_;
typedef const struct SLSeekItf_ * const * SLSeekItf;
struct SLSeekItf_ {
SLresult (*SetPosition)(
SLSeekItf self,
SLmillisecond pos,
SLuint32 seekMode
);
SLresult (*SetLoop)(
SLSeekItf self,
SLboolean loopEnable,
SLmillisecond startPos,
SLmillisecond endPos
);
SLresult (*GetLoop)(
SLSeekItf self,
SLboolean *pLoopEnabled,
SLmillisecond *pStartPos,
SLmillisecond *pEndPos
);
};
/*---------------------------------------------------------------------------*/
/* Standard Recording Interface */
/*---------------------------------------------------------------------------*/
/** Recording states */
#define SL_RECORDSTATE_STOPPED ((SLuint32) 0x00000001)
#define SL_RECORDSTATE_PAUSED ((SLuint32) 0x00000002)
#define SL_RECORDSTATE_RECORDING ((SLuint32) 0x00000003)
/** Record event **/
#define SL_RECORDEVENT_HEADATLIMIT ((SLuint32) 0x00000001)
#define SL_RECORDEVENT_HEADATMARKER ((SLuint32) 0x00000002)
#define SL_RECORDEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
#define SL_RECORDEVENT_HEADMOVING ((SLuint32) 0x00000008)
#define SL_RECORDEVENT_HEADSTALLED ((SLuint32) 0x00000010)
/* Note: SL_RECORDEVENT_BUFFER_INSUFFICIENT is deprecated, use SL_RECORDEVENT_BUFFER_FULL instead. */
#define SL_RECORDEVENT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000020)
#define SL_RECORDEVENT_BUFFER_FULL ((SLuint32) 0x00000020)
extern SL_API const SLInterfaceID SL_IID_RECORD;
struct SLRecordItf_;
typedef const struct SLRecordItf_ * const * SLRecordItf;
typedef void (SLAPIENTRY *slRecordCallback) (
SLRecordItf caller,
void *pContext,
SLuint32 event
);
/** Recording interface methods */
struct SLRecordItf_ {
SLresult (*SetRecordState) (
SLRecordItf self,
SLuint32 state
);
SLresult (*GetRecordState) (
SLRecordItf self,
SLuint32 *pState
);
SLresult (*SetDurationLimit) (
SLRecordItf self,
SLmillisecond msec
);
SLresult (*GetPosition) (
SLRecordItf self,
SLmillisecond *pMsec
);
SLresult (*RegisterCallback) (
SLRecordItf self,
slRecordCallback callback,
void *pContext
);
SLresult (*SetCallbackEventsMask) (
SLRecordItf self,
SLuint32 eventFlags
);
SLresult (*GetCallbackEventsMask) (
SLRecordItf self,
SLuint32 *pEventFlags
);
SLresult (*SetMarkerPosition) (
SLRecordItf self,
SLmillisecond mSec
);
SLresult (*ClearMarkerPosition) (
SLRecordItf self
);
SLresult (*GetMarkerPosition) (
SLRecordItf self,
SLmillisecond *pMsec
);
SLresult (*SetPositionUpdatePeriod) (
SLRecordItf self,
SLmillisecond mSec
);
SLresult (*GetPositionUpdatePeriod) (
SLRecordItf self,
SLmillisecond *pMsec
);
};
/*---------------------------------------------------------------------------*/
/* Equalizer interface */
/*---------------------------------------------------------------------------*/
#define SL_EQUALIZER_UNDEFINED ((SLuint16) 0xFFFF)
extern SL_API const SLInterfaceID SL_IID_EQUALIZER;
struct SLEqualizerItf_;
typedef const struct SLEqualizerItf_ * const * SLEqualizerItf;
struct SLEqualizerItf_ {
SLresult (*SetEnabled)(
SLEqualizerItf self,
SLboolean enabled
);
SLresult (*IsEnabled)(
SLEqualizerItf self,
SLboolean *pEnabled
);
SLresult (*GetNumberOfBands)(
SLEqualizerItf self,
SLuint16 *pAmount
);
SLresult (*GetBandLevelRange)(
SLEqualizerItf self,
SLmillibel *pMin,
SLmillibel *pMax
);
SLresult (*SetBandLevel)(
SLEqualizerItf self,
SLuint16 band,
SLmillibel level
);
SLresult (*GetBandLevel)(
SLEqualizerItf self,
SLuint16 band,
SLmillibel *pLevel
);
SLresult (*GetCenterFreq)(
SLEqualizerItf self,
SLuint16 band,
SLmilliHertz *pCenter
);
SLresult (*GetBandFreqRange)(
SLEqualizerItf self,
SLuint16 band,
SLmilliHertz *pMin,
SLmilliHertz *pMax
);
SLresult (*GetBand)(
SLEqualizerItf self,
SLmilliHertz frequency,
SLuint16 *pBand
);
SLresult (*GetCurrentPreset)(
SLEqualizerItf self,
SLuint16 *pPreset
);
SLresult (*UsePreset)(
SLEqualizerItf self,
SLuint16 index
);
SLresult (*GetNumberOfPresets)(
SLEqualizerItf self,
SLuint16 *pNumPresets
);
SLresult (*GetPresetName)(
SLEqualizerItf self,
SLuint16 index,
const SLchar ** ppName
);
};
/*---------------------------------------------------------------------------*/
/* Volume Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_VOLUME;
struct SLVolumeItf_;
typedef const struct SLVolumeItf_ * const * SLVolumeItf;
struct SLVolumeItf_ {
SLresult (*SetVolumeLevel) (
SLVolumeItf self,
SLmillibel level
);
SLresult (*GetVolumeLevel) (
SLVolumeItf self,
SLmillibel *pLevel
);
SLresult (*GetMaxVolumeLevel) (
SLVolumeItf self,
SLmillibel *pMaxLevel
);
SLresult (*SetMute) (
SLVolumeItf self,
SLboolean mute
);
SLresult (*GetMute) (
SLVolumeItf self,
SLboolean *pMute
);
SLresult (*EnableStereoPosition) (
SLVolumeItf self,
SLboolean enable
);
SLresult (*IsEnabledStereoPosition) (
SLVolumeItf self,
SLboolean *pEnable
);
SLresult (*SetStereoPosition) (
SLVolumeItf self,
SLpermille stereoPosition
);
SLresult (*GetStereoPosition) (
SLVolumeItf self,
SLpermille *pStereoPosition
);
};
/*---------------------------------------------------------------------------*/
/* Device Volume Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_DEVICEVOLUME;
struct SLDeviceVolumeItf_;
typedef const struct SLDeviceVolumeItf_ * const * SLDeviceVolumeItf;
struct SLDeviceVolumeItf_ {
SLresult (*GetVolumeScale) (
SLDeviceVolumeItf self,
SLuint32 deviceID,
SLint32 *pMinValue,
SLint32 *pMaxValue,
SLboolean *pIsMillibelScale
);
SLresult (*SetVolume) (
SLDeviceVolumeItf self,
SLuint32 deviceID,
SLint32 volume
);
SLresult (*GetVolume) (
SLDeviceVolumeItf self,
SLuint32 deviceID,
SLint32 *pVolume
);
};
/*---------------------------------------------------------------------------*/
/* Buffer Queue Interface */
/*---------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_BUFFERQUEUE;
struct SLBufferQueueItf_;
typedef const struct SLBufferQueueItf_ * const * SLBufferQueueItf;
typedef void (SLAPIENTRY *slBufferQueueCallback)(
SLBufferQueueItf caller,
void *pContext
);
/** Buffer queue state **/
typedef struct SLBufferQueueState_ {
SLuint32 count;
SLuint32 playIndex;
} SLBufferQueueState;
struct SLBufferQueueItf_ {
SLresult (*Enqueue) (
SLBufferQueueItf self,
const void *pBuffer,
SLuint32 size
);
SLresult (*Clear) (
SLBufferQueueItf self
);
SLresult (*GetState) (
SLBufferQueueItf self,
SLBufferQueueState *pState
);
SLresult (*RegisterCallback) (
SLBufferQueueItf self,
slBufferQueueCallback callback,
void* pContext
);
};
/*---------------------------------------------------------------------------*/
/* PresetReverb */
/*---------------------------------------------------------------------------*/
#define SL_REVERBPRESET_NONE ((SLuint16) 0x0000)
#define SL_REVERBPRESET_SMALLROOM ((SLuint16) 0x0001)
#define SL_REVERBPRESET_MEDIUMROOM ((SLuint16) 0x0002)
#define SL_REVERBPRESET_LARGEROOM ((SLuint16) 0x0003)
#define SL_REVERBPRESET_MEDIUMHALL ((SLuint16) 0x0004)
#define SL_REVERBPRESET_LARGEHALL ((SLuint16) 0x0005)
#define SL_REVERBPRESET_PLATE ((SLuint16) 0x0006)
extern SL_API const SLInterfaceID SL_IID_PRESETREVERB;
struct SLPresetReverbItf_;
typedef const struct SLPresetReverbItf_ * const * SLPresetReverbItf;
struct SLPresetReverbItf_ {
SLresult (*SetPreset) (
SLPresetReverbItf self,
SLuint16 preset
);
SLresult (*GetPreset) (
SLPresetReverbItf self,
SLuint16 *pPreset
);
};
/*---------------------------------------------------------------------------*/
/* EnvironmentalReverb */
/*---------------------------------------------------------------------------*/
#define SL_I3DL2_ENVIRONMENT_PRESET_DEFAULT \
{ SL_MILLIBEL_MIN, 0, 1000, 500, SL_MILLIBEL_MIN, 20, SL_MILLIBEL_MIN, 40, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_GENERIC \
{ -1000, -100, 1490, 830, -2602, 7, 200, 11, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \
{ -1000,-6000, 170, 100, -1204, 1, 207, 2, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_ROOM \
{ -1000, -454, 400, 830, -1646, 2, 53, 3, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_BATHROOM \
{ -1000,-1200, 1490, 540, -370, 7, 1030, 11, 1000, 600 }
#define SL_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \
{ -1000,-6000, 500, 100, -1376, 3, -1104, 4, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_STONEROOM \
{ -1000, -300, 2310, 640, -711, 12, 83, 17, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \
{ -1000, -476, 4320, 590, -789, 20, -289, 30, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \
{ -1000, -500, 3920, 700, -1230, 20, -2, 29, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_CAVE \
{ -1000, 0, 2910, 1300, -602, 15, -302, 22, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_ARENA \
{ -1000, -698, 7240, 330, -1166, 20, 16, 30, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_HANGAR \
{ -1000,-1000, 10050, 230, -602, 20, 198, 30, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \
{ -1000,-4000, 300, 100, -1831, 2, -1630, 30, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_HALLWAY \
{ -1000, -300, 1490, 590, -1219, 7, 441, 11, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \
{ -1000, -237, 2700, 790, -1214, 13, 395, 20, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_ALLEY \
{ -1000, -270, 1490, 860, -1204, 7, -4, 11, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_FOREST \
{ -1000,-3300, 1490, 540, -2560, 162, -613, 88, 790,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_CITY \
{ -1000, -800, 1490, 670, -2273, 7, -2217, 11, 500,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \
{ -1000,-2500, 1490, 210, -2780, 300, -2014, 100, 270,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_QUARRY \
{ -1000,-1000, 1490, 830, SL_MILLIBEL_MIN, 61, 500, 25, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_PLAIN \
{ -1000,-2000, 1490, 500, -2466, 179, -2514, 100, 210,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \
{ -1000, 0, 1650, 1500, -1363, 8, -1153, 12, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \
{ -1000,-1000, 2810, 140, 429, 14, 648, 21, 800, 600 }
#define SL_I3DL2_ENVIRONMENT_PRESET_UNDERWATER \
{ -1000,-4000, 1490, 100, -449, 7, 1700, 11, 1000,1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_SMALLROOM \
{ -1000,-600, 1100, 830, -400, 5, 500, 10, 1000, 1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \
{ -1000,-600, 1300, 830, -1000, 20, -200, 20, 1000, 1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEROOM \
{ -1000,-600, 1500, 830, -1600, 5, -1000, 40, 1000, 1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \
{ -1000,-600, 1800, 700, -1300, 15, -800, 30, 1000, 1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEHALL \
{ -1000,-600, 1800, 700, -2000, 30, -1400, 60, 1000, 1000 }
#define SL_I3DL2_ENVIRONMENT_PRESET_PLATE \
{ -1000,-200, 1300, 900, 0, 2, 0, 10, 1000, 750 }
typedef struct SLEnvironmentalReverbSettings_ {
SLmillibel roomLevel;
SLmillibel roomHFLevel;
SLmillisecond decayTime;
SLpermille decayHFRatio;
SLmillibel reflectionsLevel;
SLmillisecond reflectionsDelay;
SLmillibel reverbLevel;
SLmillisecond reverbDelay;
SLpermille diffusion;
SLpermille density;
} SLEnvironmentalReverbSettings;
extern SL_API const SLInterfaceID SL_IID_ENVIRONMENTALREVERB;
struct SLEnvironmentalReverbItf_;
typedef const struct SLEnvironmentalReverbItf_ * const * SLEnvironmentalReverbItf;
struct SLEnvironmentalReverbItf_ {
SLresult (*SetRoomLevel) (
SLEnvironmentalReverbItf self,
SLmillibel room
);
SLresult (*GetRoomLevel) (
SLEnvironmentalReverbItf self,
SLmillibel *pRoom
);
SLresult (*SetRoomHFLevel) (
SLEnvironmentalReverbItf self,
SLmillibel roomHF
);
SLresult (*GetRoomHFLevel) (
SLEnvironmentalReverbItf self,
SLmillibel *pRoomHF
);
SLresult (*SetDecayTime) (
SLEnvironmentalReverbItf self,
SLmillisecond decayTime
);
SLresult (*GetDecayTime) (
SLEnvironmentalReverbItf self,
SLmillisecond *pDecayTime
);
SLresult (*SetDecayHFRatio) (
SLEnvironmentalReverbItf self,
SLpermille decayHFRatio
);
SLresult (*GetDecayHFRatio) (
SLEnvironmentalReverbItf self,
SLpermille *pDecayHFRatio
);
SLresult (*SetReflectionsLevel) (
SLEnvironmentalReverbItf self,
SLmillibel reflectionsLevel
);
SLresult (*GetReflectionsLevel) (
SLEnvironmentalReverbItf self,
SLmillibel *pReflectionsLevel
);
SLresult (*SetReflectionsDelay) (
SLEnvironmentalReverbItf self,
SLmillisecond reflectionsDelay
);
SLresult (*GetReflectionsDelay) (
SLEnvironmentalReverbItf self,
SLmillisecond *pReflectionsDelay
);
SLresult (*SetReverbLevel) (
SLEnvironmentalReverbItf self,
SLmillibel reverbLevel
);
SLresult (*GetReverbLevel) (
SLEnvironmentalReverbItf self,
SLmillibel *pReverbLevel
);
SLresult (*SetReverbDelay) (
SLEnvironmentalReverbItf self,
SLmillisecond reverbDelay
);
SLresult (*GetReverbDelay) (
SLEnvironmentalReverbItf self,
SLmillisecond *pReverbDelay
);
SLresult (*SetDiffusion) (
SLEnvironmentalReverbItf self,
SLpermille diffusion
);
SLresult (*GetDiffusion) (
SLEnvironmentalReverbItf self,
SLpermille *pDiffusion
);
SLresult (*SetDensity) (
SLEnvironmentalReverbItf self,
SLpermille density
);
SLresult (*GetDensity) (
SLEnvironmentalReverbItf self,
SLpermille *pDensity
);
SLresult (*SetEnvironmentalReverbProperties) (
SLEnvironmentalReverbItf self,
const SLEnvironmentalReverbSettings *pProperties
);
SLresult (*GetEnvironmentalReverbProperties) (
SLEnvironmentalReverbItf self,
SLEnvironmentalReverbSettings *pProperties
);
};
/*---------------------------------------------------------------------------*/
/* Effects Send Interface */
/*---------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_EFFECTSEND;
struct SLEffectSendItf_;
typedef const struct SLEffectSendItf_ * const * SLEffectSendItf;
struct SLEffectSendItf_ {
SLresult (*EnableEffectSend) (
SLEffectSendItf self,
const void *pAuxEffect,
SLboolean enable,
SLmillibel initialLevel
);
SLresult (*IsEnabled) (
SLEffectSendItf self,
const void * pAuxEffect,
SLboolean *pEnable
);
SLresult (*SetDirectLevel) (
SLEffectSendItf self,
SLmillibel directLevel
);
SLresult (*GetDirectLevel) (
SLEffectSendItf self,
SLmillibel *pDirectLevel
);
SLresult (*SetSendLevel) (
SLEffectSendItf self,
const void *pAuxEffect,
SLmillibel sendLevel
);
SLresult (*GetSendLevel)(
SLEffectSendItf self,
const void *pAuxEffect,
SLmillibel *pSendLevel
);
};
/*---------------------------------------------------------------------------*/
/* 3D Grouping Interface */
/*---------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_3DGROUPING;
struct SL3DGroupingItf_ ;
typedef const struct SL3DGroupingItf_ * const * SL3DGroupingItf;
struct SL3DGroupingItf_ {
SLresult (*Set3DGroup) (
SL3DGroupingItf self,
SLObjectItf group
);
SLresult (*Get3DGroup) (
SL3DGroupingItf self,
SLObjectItf *pGroup
);
};
/*---------------------------------------------------------------------------*/
/* 3D Commit Interface */
/*---------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_3DCOMMIT;
struct SL3DCommitItf_;
typedef const struct SL3DCommitItf_* const * SL3DCommitItf;
struct SL3DCommitItf_ {
SLresult (*Commit) (
SL3DCommitItf self
);
SLresult (*SetDeferred) (
SL3DCommitItf self,
SLboolean deferred
);
};
/*---------------------------------------------------------------------------*/
/* 3D Location Interface */
/*---------------------------------------------------------------------------*/
typedef struct SLVec3D_ {
SLint32 x;
SLint32 y;
SLint32 z;
} SLVec3D;
extern SL_API const SLInterfaceID SL_IID_3DLOCATION;
struct SL3DLocationItf_;
typedef const struct SL3DLocationItf_ * const * SL3DLocationItf;
struct SL3DLocationItf_ {
SLresult (*SetLocationCartesian) (
SL3DLocationItf self,
const SLVec3D *pLocation
);
SLresult (*SetLocationSpherical) (
SL3DLocationItf self,
SLmillidegree azimuth,
SLmillidegree elevation,
SLmillimeter distance
);
SLresult (*Move) (
SL3DLocationItf self,
const SLVec3D *pMovement
);
SLresult (*GetLocationCartesian) (
SL3DLocationItf self,
SLVec3D *pLocation
);
SLresult (*SetOrientationVectors) (
SL3DLocationItf self,
const SLVec3D *pFront,
const SLVec3D *pAbove
);
SLresult (*SetOrientationAngles) (
SL3DLocationItf self,
SLmillidegree heading,
SLmillidegree pitch,
SLmillidegree roll
);
SLresult (*Rotate) (
SL3DLocationItf self,
SLmillidegree theta,
const SLVec3D *pAxis
);
SLresult (*GetOrientationVectors) (
SL3DLocationItf self,
SLVec3D *pFront,
SLVec3D *pUp
);
};
/*---------------------------------------------------------------------------*/
/* 3D Doppler Interface */
/*---------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_3DDOPPLER;
struct SL3DDopplerItf_;
typedef const struct SL3DDopplerItf_ * const * SL3DDopplerItf;
struct SL3DDopplerItf_ {
SLresult (*SetVelocityCartesian) (
SL3DDopplerItf self,
const SLVec3D *pVelocity
);
SLresult (*SetVelocitySpherical) (
SL3DDopplerItf self,
SLmillidegree azimuth,
SLmillidegree elevation,
SLmillimeter speed
);
SLresult (*GetVelocityCartesian) (
SL3DDopplerItf self,
SLVec3D *pVelocity
);
SLresult (*SetDopplerFactor) (
SL3DDopplerItf self,
SLpermille dopplerFactor
);
SLresult (*GetDopplerFactor) (
SL3DDopplerItf self,
SLpermille *pDopplerFactor
);
};
/*---------------------------------------------------------------------------*/
/* 3D Source Interface and associated defines */
/* --------------------------------------------------------------------------*/
#define SL_ROLLOFFMODEL_EXPONENTIAL ((SLuint32) 0x00000000)
#define SL_ROLLOFFMODEL_LINEAR ((SLuint32) 0x00000001)
extern SL_API const SLInterfaceID SL_IID_3DSOURCE;
struct SL3DSourceItf_;
typedef const struct SL3DSourceItf_ * const * SL3DSourceItf;
struct SL3DSourceItf_ {
SLresult (*SetHeadRelative) (
SL3DSourceItf self,
SLboolean headRelative
);
SLresult (*GetHeadRelative) (
SL3DSourceItf self,
SLboolean *pHeadRelative
);
SLresult (*SetRolloffDistances) (
SL3DSourceItf self,
SLmillimeter minDistance,
SLmillimeter maxDistance
);
SLresult (*GetRolloffDistances) (
SL3DSourceItf self,
SLmillimeter *pMinDistance,
SLmillimeter *pMaxDistance
);
SLresult (*SetRolloffMaxDistanceMute) (
SL3DSourceItf self,
SLboolean mute
);
SLresult (*GetRolloffMaxDistanceMute) (
SL3DSourceItf self,
SLboolean *pMute
);
SLresult (*SetRolloffFactor) (
SL3DSourceItf self,
SLpermille rolloffFactor
);
SLresult (*GetRolloffFactor) (
SL3DSourceItf self,
SLpermille *pRolloffFactor
);
SLresult (*SetRoomRolloffFactor) (
SL3DSourceItf self,
SLpermille roomRolloffFactor
);
SLresult (*GetRoomRolloffFactor) (
SL3DSourceItf self,
SLpermille *pRoomRolloffFactor
);
SLresult (*SetRolloffModel) (
SL3DSourceItf self,
SLuint8 model
);
SLresult (*GetRolloffModel) (
SL3DSourceItf self,
SLuint8 *pModel
);
SLresult (*SetCone) (
SL3DSourceItf self,
SLmillidegree innerAngle,
SLmillidegree outerAngle,
SLmillibel outerLevel
);
SLresult (*GetCone) (
SL3DSourceItf self,
SLmillidegree *pInnerAngle,
SLmillidegree *pOuterAngle,
SLmillibel *pOuterLevel
);
};
/*---------------------------------------------------------------------------*/
/* 3D Macroscopic Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_3DMACROSCOPIC;
struct SL3DMacroscopicItf_;
typedef const struct SL3DMacroscopicItf_ * const * SL3DMacroscopicItf;
struct SL3DMacroscopicItf_ {
SLresult (*SetSize) (
SL3DMacroscopicItf self,
SLmillimeter width,
SLmillimeter height,
SLmillimeter depth
);
SLresult (*GetSize) (
SL3DMacroscopicItf self,
SLmillimeter *pWidth,
SLmillimeter *pHeight,
SLmillimeter *pDepth
);
SLresult (*SetOrientationAngles) (
SL3DMacroscopicItf self,
SLmillidegree heading,
SLmillidegree pitch,
SLmillidegree roll
);
SLresult (*SetOrientationVectors) (
SL3DMacroscopicItf self,
const SLVec3D *pFront,
const SLVec3D *pAbove
);
SLresult (*Rotate) (
SL3DMacroscopicItf self,
SLmillidegree theta,
const SLVec3D *pAxis
);
SLresult (*GetOrientationVectors) (
SL3DMacroscopicItf self,
SLVec3D *pFront,
SLVec3D *pUp
);
};
/*---------------------------------------------------------------------------*/
/* Mute Solo Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_MUTESOLO;
struct SLMuteSoloItf_;
typedef const struct SLMuteSoloItf_ * const * SLMuteSoloItf;
struct SLMuteSoloItf_ {
SLresult (*SetChannelMute) (
SLMuteSoloItf self,
SLuint8 chan,
SLboolean mute
);
SLresult (*GetChannelMute) (
SLMuteSoloItf self,
SLuint8 chan,
SLboolean *pMute
);
SLresult (*SetChannelSolo) (
SLMuteSoloItf self,
SLuint8 chan,
SLboolean solo
);
SLresult (*GetChannelSolo) (
SLMuteSoloItf self,
SLuint8 chan,
SLboolean *pSolo
);
SLresult (*GetNumChannels) (
SLMuteSoloItf self,
SLuint8 *pNumChannels
);
};
/*---------------------------------------------------------------------------*/
/* Dynamic Interface Management Interface and associated types and macros */
/* --------------------------------------------------------------------------*/
#define SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
#define SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((SLuint32) 0x00000004)
#define SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000005)
extern SL_API const SLInterfaceID SL_IID_DYNAMICINTERFACEMANAGEMENT;
struct SLDynamicInterfaceManagementItf_;
typedef const struct SLDynamicInterfaceManagementItf_ * const * SLDynamicInterfaceManagementItf;
typedef void (SLAPIENTRY *slDynamicInterfaceManagementCallback) (
SLDynamicInterfaceManagementItf caller,
void * pContext,
SLuint32 event,
SLresult result,
const SLInterfaceID iid
);
struct SLDynamicInterfaceManagementItf_ {
SLresult (*AddInterface) (
SLDynamicInterfaceManagementItf self,
const SLInterfaceID iid,
SLboolean async
);
SLresult (*RemoveInterface) (
SLDynamicInterfaceManagementItf self,
const SLInterfaceID iid
);
SLresult (*ResumeInterface) (
SLDynamicInterfaceManagementItf self,
const SLInterfaceID iid,
SLboolean async
);
SLresult (*RegisterCallback) (
SLDynamicInterfaceManagementItf self,
slDynamicInterfaceManagementCallback callback,
void * pContext
);
};
/*---------------------------------------------------------------------------*/
/* Midi Message Interface and associated types */
/* --------------------------------------------------------------------------*/
#define SL_MIDIMESSAGETYPE_NOTE_ON_OFF ((SLuint32) 0x00000001)
#define SL_MIDIMESSAGETYPE_POLY_PRESSURE ((SLuint32) 0x00000002)
#define SL_MIDIMESSAGETYPE_CONTROL_CHANGE ((SLuint32) 0x00000003)
#define SL_MIDIMESSAGETYPE_PROGRAM_CHANGE ((SLuint32) 0x00000004)
#define SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE ((SLuint32) 0x00000005)
#define SL_MIDIMESSAGETYPE_PITCH_BEND ((SLuint32) 0x00000006)
#define SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE ((SLuint32) 0x00000007)
extern SL_API const SLInterfaceID SL_IID_MIDIMESSAGE;
struct SLMIDIMessageItf_;
typedef const struct SLMIDIMessageItf_ * const * SLMIDIMessageItf;
typedef void (SLAPIENTRY *slMetaEventCallback) (
SLMIDIMessageItf caller,
void *pContext,
SLuint8 type,
SLuint32 length,
const SLuint8 *pData,
SLuint32 tick,
SLuint16 track
);
typedef void (SLAPIENTRY *slMIDIMessageCallback) (
SLMIDIMessageItf caller,
void *pContext,
SLuint8 statusByte,
SLuint32 length,
const SLuint8 *pData,
SLuint32 tick,
SLuint16 track
);
struct SLMIDIMessageItf_ {
SLresult (*SendMessage) (
SLMIDIMessageItf self,
const SLuint8 *data,
SLuint32 length
);
SLresult (*RegisterMetaEventCallback) (
SLMIDIMessageItf self,
slMetaEventCallback callback,
void *pContext
);
SLresult (*RegisterMIDIMessageCallback) (
SLMIDIMessageItf self,
slMIDIMessageCallback callback,
void *pContext
);
SLresult (*AddMIDIMessageCallbackFilter) (
SLMIDIMessageItf self,
SLuint32 messageType
);
SLresult (*ClearMIDIMessageCallbackFilter) (
SLMIDIMessageItf self
);
};
/*---------------------------------------------------------------------------*/
/* Midi Mute Solo interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_MIDIMUTESOLO;
struct SLMIDIMuteSoloItf_;
typedef const struct SLMIDIMuteSoloItf_ * const * SLMIDIMuteSoloItf;
struct SLMIDIMuteSoloItf_ {
SLresult (*SetChannelMute) (
SLMIDIMuteSoloItf self,
SLuint8 channel,
SLboolean mute
);
SLresult (*GetChannelMute) (
SLMIDIMuteSoloItf self,
SLuint8 channel,
SLboolean *pMute
);
SLresult (*SetChannelSolo) (
SLMIDIMuteSoloItf self,
SLuint8 channel,
SLboolean solo
);
SLresult (*GetChannelSolo) (
SLMIDIMuteSoloItf self,
SLuint8 channel,
SLboolean *pSolo
);
SLresult (*GetTrackCount) (
SLMIDIMuteSoloItf self,
SLuint16 *pCount
);
SLresult (*SetTrackMute) (
SLMIDIMuteSoloItf self,
SLuint16 track,
SLboolean mute
);
SLresult (*GetTrackMute) (
SLMIDIMuteSoloItf self,
SLuint16 track,
SLboolean *pMute
);
SLresult (*SetTrackSolo) (
SLMIDIMuteSoloItf self,
SLuint16 track,
SLboolean solo
);
SLresult (*GetTrackSolo) (
SLMIDIMuteSoloItf self,
SLuint16 track,
SLboolean *pSolo
);
};
/*---------------------------------------------------------------------------*/
/* Midi Tempo interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_MIDITEMPO;
struct SLMIDITempoItf_;
typedef const struct SLMIDITempoItf_ * const * SLMIDITempoItf;
struct SLMIDITempoItf_ {
SLresult (*SetTicksPerQuarterNote) (
SLMIDITempoItf self,
SLuint32 tpqn
);
SLresult (*GetTicksPerQuarterNote) (
SLMIDITempoItf self,
SLuint32 *pTpqn
);
SLresult (*SetMicrosecondsPerQuarterNote) (
SLMIDITempoItf self,
SLmicrosecond uspqn
);
SLresult (*GetMicrosecondsPerQuarterNote) (
SLMIDITempoItf self,
SLmicrosecond *uspqn
);
};
/*---------------------------------------------------------------------------*/
/* Midi Time interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_MIDITIME;
struct SLMIDITimeItf_;
typedef const struct SLMIDITimeItf_ * const * SLMIDITimeItf;
struct SLMIDITimeItf_ {
SLresult (*GetDuration) (
SLMIDITimeItf self,
SLuint32 *pDuration
);
SLresult (*SetPosition) (
SLMIDITimeItf self,
SLuint32 position
);
SLresult (*GetPosition) (
SLMIDITimeItf self,
SLuint32 *pPosition
);
SLresult (*SetLoopPoints) (
SLMIDITimeItf self,
SLuint32 startTick,
SLuint32 numTicks
);
SLresult (*GetLoopPoints) (
SLMIDITimeItf self,
SLuint32 *pStartTick,
SLuint32 *pNumTicks
);
};
/*---------------------------------------------------------------------------*/
/* Audio Decoder Capabilities Interface */
/* --------------------------------------------------------------------------*/
/*Audio Codec related defines*/
#define SL_RATECONTROLMODE_CONSTANTBITRATE ((SLuint32) 0x00000001)
#define SL_RATECONTROLMODE_VARIABLEBITRATE ((SLuint32) 0x00000002)
#define SL_AUDIOCODEC_PCM ((SLuint32) 0x00000001)
#define SL_AUDIOCODEC_MP3 ((SLuint32) 0x00000002)
#define SL_AUDIOCODEC_AMR ((SLuint32) 0x00000003)
#define SL_AUDIOCODEC_AMRWB ((SLuint32) 0x00000004)
#define SL_AUDIOCODEC_AMRWBPLUS ((SLuint32) 0x00000005)
#define SL_AUDIOCODEC_AAC ((SLuint32) 0x00000006)
#define SL_AUDIOCODEC_WMA ((SLuint32) 0x00000007)
#define SL_AUDIOCODEC_REAL ((SLuint32) 0x00000008)
#define SL_AUDIOPROFILE_PCM ((SLuint32) 0x00000001)
#define SL_AUDIOPROFILE_MPEG1_L3 ((SLuint32) 0x00000001)
#define SL_AUDIOPROFILE_MPEG2_L3 ((SLuint32) 0x00000002)
#define SL_AUDIOPROFILE_MPEG25_L3 ((SLuint32) 0x00000003)
#define SL_AUDIOCHANMODE_MP3_MONO ((SLuint32) 0x00000001)
#define SL_AUDIOCHANMODE_MP3_STEREO ((SLuint32) 0x00000002)
#define SL_AUDIOCHANMODE_MP3_JOINTSTEREO ((SLuint32) 0x00000003)
#define SL_AUDIOCHANMODE_MP3_DUAL ((SLuint32) 0x00000004)
#define SL_AUDIOPROFILE_AMR ((SLuint32) 0x00000001)
#define SL_AUDIOSTREAMFORMAT_CONFORMANCE ((SLuint32) 0x00000001)
#define SL_AUDIOSTREAMFORMAT_IF1 ((SLuint32) 0x00000002)
#define SL_AUDIOSTREAMFORMAT_IF2 ((SLuint32) 0x00000003)
#define SL_AUDIOSTREAMFORMAT_FSF ((SLuint32) 0x00000004)
#define SL_AUDIOSTREAMFORMAT_RTPPAYLOAD ((SLuint32) 0x00000005)
#define SL_AUDIOSTREAMFORMAT_ITU ((SLuint32) 0x00000006)
#define SL_AUDIOPROFILE_AMRWB ((SLuint32) 0x00000001)
#define SL_AUDIOPROFILE_AMRWBPLUS ((SLuint32) 0x00000001)
#define SL_AUDIOPROFILE_AAC_AAC ((SLuint32) 0x00000001)
#define SL_AUDIOMODE_AAC_MAIN ((SLuint32) 0x00000001)
#define SL_AUDIOMODE_AAC_LC ((SLuint32) 0x00000002)
#define SL_AUDIOMODE_AAC_SSR ((SLuint32) 0x00000003)
#define SL_AUDIOMODE_AAC_LTP ((SLuint32) 0x00000004)
#define SL_AUDIOMODE_AAC_HE ((SLuint32) 0x00000005)
#define SL_AUDIOMODE_AAC_SCALABLE ((SLuint32) 0x00000006)
#define SL_AUDIOMODE_AAC_ERLC ((SLuint32) 0x00000007)
#define SL_AUDIOMODE_AAC_LD ((SLuint32) 0x00000008)
#define SL_AUDIOMODE_AAC_HE_PS ((SLuint32) 0x00000009)
#define SL_AUDIOMODE_AAC_HE_MPS ((SLuint32) 0x0000000A)
#define SL_AUDIOSTREAMFORMAT_MP2ADTS ((SLuint32) 0x00000001)
#define SL_AUDIOSTREAMFORMAT_MP4ADTS ((SLuint32) 0x00000002)
#define SL_AUDIOSTREAMFORMAT_MP4LOAS ((SLuint32) 0x00000003)
#define SL_AUDIOSTREAMFORMAT_MP4LATM ((SLuint32) 0x00000004)
#define SL_AUDIOSTREAMFORMAT_ADIF ((SLuint32) 0x00000005)
#define SL_AUDIOSTREAMFORMAT_MP4FF ((SLuint32) 0x00000006)
#define SL_AUDIOSTREAMFORMAT_RAW ((SLuint32) 0x00000007)
#define SL_AUDIOPROFILE_WMA7 ((SLuint32) 0x00000001)
#define SL_AUDIOPROFILE_WMA8 ((SLuint32) 0x00000002)
#define SL_AUDIOPROFILE_WMA9 ((SLuint32) 0x00000003)
#define SL_AUDIOPROFILE_WMA10 ((SLuint32) 0x00000004)
#define SL_AUDIOMODE_WMA_LEVEL1 ((SLuint32) 0x00000001)
#define SL_AUDIOMODE_WMA_LEVEL2 ((SLuint32) 0x00000002)
#define SL_AUDIOMODE_WMA_LEVEL3 ((SLuint32) 0x00000003)
#define SL_AUDIOMODE_WMA_LEVEL4 ((SLuint32) 0x00000004)
#define SL_AUDIOMODE_WMAPRO_LEVELM0 ((SLuint32) 0x00000005)
#define SL_AUDIOMODE_WMAPRO_LEVELM1 ((SLuint32) 0x00000006)
#define SL_AUDIOMODE_WMAPRO_LEVELM2 ((SLuint32) 0x00000007)
#define SL_AUDIOMODE_WMAPRO_LEVELM3 ((SLuint32) 0x00000008)
#define SL_AUDIOPROFILE_REALAUDIO ((SLuint32) 0x00000001)
#define SL_AUDIOMODE_REALAUDIO_G2 ((SLuint32) 0x00000001)
#define SL_AUDIOMODE_REALAUDIO_8 ((SLuint32) 0x00000002)
#define SL_AUDIOMODE_REALAUDIO_10 ((SLuint32) 0x00000003)
#define SL_AUDIOMODE_REALAUDIO_SURROUND ((SLuint32) 0x00000004)
typedef struct SLAudioCodecDescriptor_ {
SLuint32 maxChannels;
SLuint32 minBitsPerSample;
SLuint32 maxBitsPerSample;
SLmilliHertz minSampleRate;
SLmilliHertz maxSampleRate;
SLboolean isFreqRangeContinuous;
SLmilliHertz *pSampleRatesSupported;
SLuint32 numSampleRatesSupported;
SLuint32 minBitRate;
SLuint32 maxBitRate;
SLboolean isBitrateRangeContinuous;
SLuint32 *pBitratesSupported;
SLuint32 numBitratesSupported;
SLuint32 profileSetting;
SLuint32 modeSetting;
} SLAudioCodecDescriptor;
/*Structure used to retrieve the profile and level settings supported by an audio encoder */
typedef struct SLAudioCodecProfileMode_ {
SLuint32 profileSetting;
SLuint32 modeSetting;
} SLAudioCodecProfileMode;
extern SL_API const SLInterfaceID SL_IID_AUDIODECODERCAPABILITIES;
struct SLAudioDecoderCapabilitiesItf_;
typedef const struct SLAudioDecoderCapabilitiesItf_ * const * SLAudioDecoderCapabilitiesItf;
struct SLAudioDecoderCapabilitiesItf_ {
SLresult (*GetAudioDecoders) (
SLAudioDecoderCapabilitiesItf self,
SLuint32 * pNumDecoders ,
SLuint32 *pDecoderIds
);
SLresult (*GetAudioDecoderCapabilities) (
SLAudioDecoderCapabilitiesItf self,
SLuint32 decoderId,
SLuint32 *pIndex,
SLAudioCodecDescriptor *pDescriptor
);
};
/*---------------------------------------------------------------------------*/
/* Audio Encoder Capabilities Interface */
/* --------------------------------------------------------------------------*/
/* Structure used when setting audio encoding parameters */
typedef struct SLAudioEncoderSettings_ {
SLuint32 encoderId;
SLuint32 channelsIn;
SLuint32 channelsOut;
SLmilliHertz sampleRate;
SLuint32 bitRate;
SLuint32 bitsPerSample;
SLuint32 rateControl;
SLuint32 profileSetting;
SLuint32 levelSetting;
SLuint32 channelMode;
SLuint32 streamFormat;
SLuint32 encodeOptions;
SLuint32 blockAlignment;
} SLAudioEncoderSettings;
extern SL_API const SLInterfaceID SL_IID_AUDIOENCODERCAPABILITIES;
struct SLAudioEncoderCapabilitiesItf_;
typedef const struct SLAudioEncoderCapabilitiesItf_ * const * SLAudioEncoderCapabilitiesItf;
struct SLAudioEncoderCapabilitiesItf_ {
SLresult (*GetAudioEncoders) (
SLAudioEncoderCapabilitiesItf self,
SLuint32 *pNumEncoders ,
SLuint32 *pEncoderIds
);
SLresult (*GetAudioEncoderCapabilities) (
SLAudioEncoderCapabilitiesItf self,
SLuint32 encoderId,
SLuint32 *pIndex,
SLAudioCodecDescriptor * pDescriptor
);
};
/*---------------------------------------------------------------------------*/
/* Audio Encoder Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_AUDIOENCODER;
struct SLAudioEncoderItf_;
typedef const struct SLAudioEncoderItf_ * const * SLAudioEncoderItf;
struct SLAudioEncoderItf_ {
SLresult (*SetEncoderSettings) (
SLAudioEncoderItf self,
SLAudioEncoderSettings *pSettings
);
SLresult (*GetEncoderSettings) (
SLAudioEncoderItf self,
SLAudioEncoderSettings *pSettings
);
};
/*---------------------------------------------------------------------------*/
/* Bass Boost Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_BASSBOOST;
struct SLBassBoostItf_;
typedef const struct SLBassBoostItf_ * const * SLBassBoostItf;
struct SLBassBoostItf_ {
SLresult (*SetEnabled)(
SLBassBoostItf self,
SLboolean enabled
);
SLresult (*IsEnabled)(
SLBassBoostItf self,
SLboolean *pEnabled
);
SLresult (*SetStrength)(
SLBassBoostItf self,
SLpermille strength
);
SLresult (*GetRoundedStrength)(
SLBassBoostItf self,
SLpermille *pStrength
);
SLresult (*IsStrengthSupported)(
SLBassBoostItf self,
SLboolean *pSupported
);
};
/*---------------------------------------------------------------------------*/
/* Pitch Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_PITCH;
struct SLPitchItf_;
typedef const struct SLPitchItf_ * const * SLPitchItf;
struct SLPitchItf_ {
SLresult (*SetPitch) (
SLPitchItf self,
SLpermille pitch
);
SLresult (*GetPitch) (
SLPitchItf self,
SLpermille *pPitch
);
SLresult (*GetPitchCapabilities) (
SLPitchItf self,
SLpermille *pMinPitch,
SLpermille *pMaxPitch
);
};
/*---------------------------------------------------------------------------*/
/* Rate Pitch Interface */
/* RatePitchItf is an interface for controlling the rate a sound is played */
/* back. A change in rate will cause a change in pitch. */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_RATEPITCH;
struct SLRatePitchItf_;
typedef const struct SLRatePitchItf_ * const * SLRatePitchItf;
struct SLRatePitchItf_ {
SLresult (*SetRate) (
SLRatePitchItf self,
SLpermille rate
);
SLresult (*GetRate) (
SLRatePitchItf self,
SLpermille *pRate
);
SLresult (*GetRatePitchCapabilities) (
SLRatePitchItf self,
SLpermille *pMinRate,
SLpermille *pMaxRate
);
};
/*---------------------------------------------------------------------------*/
/* Virtualizer Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_VIRTUALIZER;
struct SLVirtualizerItf_;
typedef const struct SLVirtualizerItf_ * const * SLVirtualizerItf;
struct SLVirtualizerItf_ {
SLresult (*SetEnabled)(
SLVirtualizerItf self,
SLboolean enabled
);
SLresult (*IsEnabled)(
SLVirtualizerItf self,
SLboolean *pEnabled
);
SLresult (*SetStrength)(
SLVirtualizerItf self,
SLpermille strength
);
SLresult (*GetRoundedStrength)(
SLVirtualizerItf self,
SLpermille *pStrength
);
SLresult (*IsStrengthSupported)(
SLVirtualizerItf self,
SLboolean *pSupported
);
};
/*---------------------------------------------------------------------------*/
/* Visualization Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_VISUALIZATION;
struct SLVisualizationItf_;
typedef const struct SLVisualizationItf_ * const * SLVisualizationItf;
typedef void (SLAPIENTRY *slVisualizationCallback) (
void *pContext,
const SLuint8 waveform[],
const SLuint8 fft[],
SLmilliHertz samplerate
);
struct SLVisualizationItf_{
SLresult (*RegisterVisualizationCallback)(
SLVisualizationItf self,
slVisualizationCallback callback,
void *pContext,
SLmilliHertz rate
);
SLresult (*GetMaxRate)(
SLVisualizationItf self,
SLmilliHertz* pRate
);
};
/*---------------------------------------------------------------------------*/
/* Engine Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_ENGINE;
struct SLEngineItf_;
typedef const struct SLEngineItf_ * const * SLEngineItf;
struct SLEngineItf_ {
SLresult (*CreateLEDDevice) (
SLEngineItf self,
SLObjectItf * pDevice,
SLuint32 deviceID,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SLresult (*CreateVibraDevice) (
SLEngineItf self,
SLObjectItf * pDevice,
SLuint32 deviceID,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SLresult (*CreateAudioPlayer) (
SLEngineItf self,
SLObjectItf * pPlayer,
SLDataSource *pAudioSrc,
SLDataSink *pAudioSnk,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SLresult (*CreateAudioRecorder) (
SLEngineItf self,
SLObjectItf * pRecorder,
SLDataSource *pAudioSrc,
SLDataSink *pAudioSnk,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SLresult (*CreateMidiPlayer) (
SLEngineItf self,
SLObjectItf * pPlayer,
SLDataSource *pMIDISrc,
SLDataSource *pBankSrc,
SLDataSink *pAudioOutput,
SLDataSink *pVibra,
SLDataSink *pLEDArray,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SLresult (*CreateListener) (
SLEngineItf self,
SLObjectItf * pListener,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SLresult (*Create3DGroup) (
SLEngineItf self,
SLObjectItf * pGroup,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SLresult (*CreateOutputMix) (
SLEngineItf self,
SLObjectItf * pMix,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SLresult (*CreateMetadataExtractor) (
SLEngineItf self,
SLObjectItf * pMetadataExtractor,
SLDataSource * pDataSource,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SLresult (*CreateExtensionObject) (
SLEngineItf self,
SLObjectItf * pObject,
void * pParameters,
SLuint32 objectID,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SLresult (*QueryNumSupportedInterfaces) (
SLEngineItf self,
SLuint32 objectID,
SLuint32 * pNumSupportedInterfaces
);
SLresult (*QuerySupportedInterfaces) (
SLEngineItf self,
SLuint32 objectID,
SLuint32 index,
SLInterfaceID * pInterfaceId
);
SLresult (*QueryNumSupportedExtensions) (
SLEngineItf self,
SLuint32 * pNumExtensions
);
SLresult (*QuerySupportedExtension) (
SLEngineItf self,
SLuint32 index,
SLchar * pExtensionName,
SLint16 * pNameLength
);
SLresult (*IsExtensionSupported) (
SLEngineItf self,
const SLchar * pExtensionName,
SLboolean * pSupported
);
};
/*---------------------------------------------------------------------------*/
/* Engine Capabilities Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_ENGINECAPABILITIES;
struct SLEngineCapabilitiesItf_;
typedef const struct SLEngineCapabilitiesItf_ * const * SLEngineCapabilitiesItf;
struct SLEngineCapabilitiesItf_ {
SLresult (*QuerySupportedProfiles) (
SLEngineCapabilitiesItf self,
SLuint16 *pProfilesSupported
);
SLresult (*QueryAvailableVoices) (
SLEngineCapabilitiesItf self,
SLuint16 voiceType,
SLint16 *pNumMaxVoices,
SLboolean *pIsAbsoluteMax,
SLint16 *pNumFreeVoices
);
SLresult (*QueryNumberOfMIDISynthesizers) (
SLEngineCapabilitiesItf self,
SLint16 *pNumMIDIsynthesizers
);
SLresult (*QueryAPIVersion) (
SLEngineCapabilitiesItf self,
SLint16 *pMajor,
SLint16 *pMinor,
SLint16 *pStep
);
SLresult (*QueryLEDCapabilities) (
SLEngineCapabilitiesItf self,
SLuint32 *pIndex,
SLuint32 *pLEDDeviceID,
SLLEDDescriptor *pDescriptor
);
SLresult (*QueryVibraCapabilities) (
SLEngineCapabilitiesItf self,
SLuint32 *pIndex,
SLuint32 *pVibraDeviceID,
SLVibraDescriptor *pDescriptor
);
SLresult (*IsThreadSafe) (
SLEngineCapabilitiesItf self,
SLboolean *pIsThreadSafe
);
};
/*---------------------------------------------------------------------------*/
/* Thread Sync Interface */
/* --------------------------------------------------------------------------*/
extern SL_API const SLInterfaceID SL_IID_THREADSYNC;
struct SLThreadSyncItf_;
typedef const struct SLThreadSyncItf_ * const * SLThreadSyncItf;
struct SLThreadSyncItf_ {
SLresult (*EnterCriticalSection) (
SLThreadSyncItf self
);
SLresult (*ExitCriticalSection) (
SLThreadSyncItf self
);
};
/*****************************************************************************/
/* SL engine constructor */
/*****************************************************************************/
#define SL_ENGINEOPTION_THREADSAFE ((SLuint32) 0x00000001)
#define SL_ENGINEOPTION_LOSSOFCONTROL ((SLuint32) 0x00000002)
typedef struct SLEngineOption_ {
SLuint32 feature;
SLuint32 data;
} SLEngineOption;
SL_API SLresult SLAPIENTRY slCreateEngine(
SLObjectItf *pEngine,
SLuint32 numOptions,
const SLEngineOption *pEngineOptions,
SLuint32 numInterfaces,
const SLInterfaceID *pInterfaceIds,
const SLboolean * pInterfaceRequired
);
SL_API SLresult SLAPIENTRY slQueryNumSupportedEngineInterfaces(
SLuint32 * pNumSupportedInterfaces
);
SL_API SLresult SLAPIENTRY slQuerySupportedEngineInterfaces(
SLuint32 index,
SLInterfaceID * pInterfaceId
);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* OPENSL_ES_H_ */
|