1#![allow(non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4
5use bindings::*;
6
7pub mod bindings;
8
9pub const SL_BOOLEAN_FALSE: SLboolean = 0x00000000;
10pub const SL_BOOLEAN_TRUE: SLboolean = 0x00000001;
11
12pub const SL_MILLIBEL_MAX: SLmillibel = 0x7FFF;
13pub const SL_MILLIBEL_MIN: SLmillibel = -SL_MILLIBEL_MAX - 1;
14
15pub const SL_MILLIHERTZ_MAX: SLmilliHertz = 0xFFFFFFFF;
16pub const SL_MILLIMETER_MAX: SLmillimeter = 0x7FFFFFFF;
17
18pub const SL_OBJECTID_ENGINE: SLuint32 = 0x00001001;
19pub const SL_OBJECTID_LEDDEVICE: SLuint32 = 0x00001002;
20pub const SL_OBJECTID_VIBRADEVICE: SLuint32 = 0x00001003;
21pub const SL_OBJECTID_AUDIOPLAYER: SLuint32 = 0x00001004;
22pub const SL_OBJECTID_AUDIORECORDER: SLuint32 = 0x00001005;
23pub const SL_OBJECTID_MIDIPLAYER: SLuint32 = 0x00001006;
24pub const SL_OBJECTID_LISTENER: SLuint32 = 0x00001007;
25pub const SL_OBJECTID_3DGROUP: SLuint32 = 0x00001008;
26pub const SL_OBJECTID_OUTPUTMIX: SLuint32 = 0x00001009;
27pub const SL_OBJECTID_METADATAEXTRACTOR: SLuint32 = 0x0000100A;
28
29pub const SL_PROFILES_PHONE: SLuint16 = 0x0001;
30pub const SL_PROFILES_MUSIC: SLuint16 = 0x0002;
31pub const SL_PROFILES_GAME: SLuint16 = 0x0004;
32
33pub const SL_VOICETYPE_2D_AUDIO: SLuint16 = 0x0001;
34pub const SL_VOICETYPE_MIDI: SLuint16 = 0x0002;
35pub const SL_VOICETYPE_3D_AUDIO: SLuint16 = 0x0004;
36pub const SL_VOICETYPE_3D_MIDIOUTPUT: SLuint16 = 0x0008;
37
38pub const SL_PRIORITY_LOWEST: SLint32 = -0x7FFFFFFF - 1;
39pub const SL_PRIORITY_VERYLOW: SLint32 = -0x60000000;
40pub const SL_PRIORITY_LOW: SLint32 = -0x40000000;
41pub const SL_PRIORITY_BELOWNORMAL: SLint32 = -0x20000000;
42pub const SL_PRIORITY_NORMAL: SLint32 = 0x00000000;
43pub const SL_PRIORITY_ABOVENORMAL: SLint32 = 0x20000000;
44pub const SL_PRIORITY_HIGH: SLint32 = 0x40000000;
45pub const SL_PRIORITY_VERYHIGH: SLint32 = 0x60000000;
46pub const SL_PRIORITY_HIGHEST: SLint32 = 0x7FFFFFFF;
47
48pub const SL_PCMSAMPLEFORMAT_FIXED_8: SLuint16 = 0x0008;
49pub const SL_PCMSAMPLEFORMAT_FIXED_16: SLuint16 = 0x0010;
50pub const SL_PCMSAMPLEFORMAT_FIXED_20: SLuint16 = 0x0014;
51pub const SL_PCMSAMPLEFORMAT_FIXED_24: SLuint16 = 0x0018;
52pub const SL_PCMSAMPLEFORMAT_FIXED_28: SLuint16 = 0x001C;
53pub const SL_PCMSAMPLEFORMAT_FIXED_32: SLuint16 = 0x0020;
54
55pub const SL_SAMPLINGRATE_8: SLuint32 = 8000000;
56pub const SL_SAMPLINGRATE_11_025: SLuint32 = 11025000;
57pub const SL_SAMPLINGRATE_12: SLuint32 = 12000000;
58pub const SL_SAMPLINGRATE_16: SLuint32 = 16000000;
59pub const SL_SAMPLINGRATE_22_05: SLuint32 = 22050000;
60pub const SL_SAMPLINGRATE_24: SLuint32 = 24000000;
61pub const SL_SAMPLINGRATE_32: SLuint32 = 32000000;
62pub const SL_SAMPLINGRATE_44_1: SLuint32 = 44100000;
63pub const SL_SAMPLINGRATE_48: SLuint32 = 48000000;
64pub const SL_SAMPLINGRATE_64: SLuint32 = 64000000;
65pub const SL_SAMPLINGRATE_88_2: SLuint32 = 88200000;
66pub const SL_SAMPLINGRATE_96: SLuint32 = 96000000;
67pub const SL_SAMPLINGRATE_192: SLuint32 = 192000000;
68
69pub const SL_SPEAKER_FRONT_LEFT: SLuint32 = 0x00000001;
70pub const SL_SPEAKER_FRONT_RIGHT: SLuint32 = 0x00000002;
71pub const SL_SPEAKER_FRONT_CENTER: SLuint32 = 0x00000004;
72pub const SL_SPEAKER_LOW_FREQUENCY: SLuint32 = 0x00000008;
73pub const SL_SPEAKER_BACK_LEFT: SLuint32 = 0x00000010;
74pub const SL_SPEAKER_BACK_RIGHT: SLuint32 = 0x00000020;
75pub const SL_SPEAKER_FRONT_LEFT_OF_CENTER: SLuint32 = 0x00000040;
76pub const SL_SPEAKER_FRONT_RIGHT_OF_CENTER: SLuint32 = 0x00000080;
77pub const SL_SPEAKER_BACK_CENTER: SLuint32 = 0x00000100;
78pub const SL_SPEAKER_SIDE_LEFT: SLuint32 = 0x00000200;
79pub const SL_SPEAKER_SIDE_RIGHT: SLuint32 = 0x00000400;
80pub const SL_SPEAKER_TOP_CENTER: SLuint32 = 0x00000800;
81pub const SL_SPEAKER_TOP_FRONT_LEFT: SLuint32 = 0x00001000;
82pub const SL_SPEAKER_TOP_FRONT_CENTER: SLuint32 = 0x00002000;
83pub const SL_SPEAKER_TOP_FRONT_RIGHT: SLuint32 = 0x00004000;
84pub const SL_SPEAKER_TOP_BACK_LEFT: SLuint32 = 0x00008000;
85pub const SL_SPEAKER_TOP_BACK_CENTER: SLuint32 = 0x00010000;
86pub const SL_SPEAKER_TOP_BACK_RIGHT: SLuint32 = 0x00020000;
87
88pub const SL_OBJECT_STATE_UNREALIZED: SLuint32 = 0x00000001;
89pub const SL_OBJECT_STATE_REALIZED: SLuint32 = 0x00000002;
90pub const SL_OBJECT_STATE_SUSPENDED: SLuint32 = 0x00000003;
91
92pub const SL_OBJECT_EVENT_RUNTIME_ERROR: SLuint32 = 0x00000001;
93pub const SL_OBJECT_EVENT_ASYNC_TERMINATION: SLuint32 = 0x00000002;
94pub const SL_OBJECT_EVENT_RESOURCES_LOST: SLuint32 = 0x00000003;
95pub const SL_OBJECT_EVENT_RESOURCES_AVAILABLE: SLuint32 = 0x00000004;
96pub const SL_OBJECT_EVENT_ITF_CONTROL_TAKEN: SLuint32 = 0x00000005;
97pub const SL_OBJECT_EVENT_ITF_CONTROL_RETURNED: SLuint32 = 0x00000006;
98pub const SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED: SLuint32 = 0x00000007;
99
100pub const SL_DATALOCATOR_URI: SLuint32 = 0x00000001;
101pub const SL_DATALOCATOR_ADDRESS: SLuint32 = 0x00000002;
102pub const SL_DATALOCATOR_IODEVICE: SLuint32 = 0x00000003;
103pub const SL_DATALOCATOR_OUTPUTMIX: SLuint32 = 0x00000004;
104pub const SL_DATALOCATOR_RESERVED5: SLuint32 = 0x00000005;
105pub const SL_DATALOCATOR_BUFFERQUEUE: SLuint32 = 0x00000006;
106pub const SL_DATALOCATOR_MIDIBUFFERQUEUE: SLuint32 = 0x00000007;
107pub const SL_DATALOCATOR_RESERVED8: SLuint32 = 0x00000008;
108
109pub const SL_IODEVICE_AUDIOINPUT: SLuint32 = 0x00000001;
110pub const SL_IODEVICE_LEDARRAY: SLuint32 = 0x00000002;
111pub const SL_IODEVICE_VIBRA: SLuint32 = 0x00000003;
112pub const SL_IODEVICE_RESERVED4: SLuint32 = 0x00000004;
113pub const SL_IODEVICE_RESERVED5: SLuint32 = 0x00000005;
114
115pub const SL_DATAFORMAT_MIME: SLuint32 = 0x00000001;
116pub const SL_DATAFORMAT_PCM: SLuint32 = 0x00000002;
117pub const SL_DATAFORMAT_RESERVED3: SLuint32 = 0x00000003;
118
119pub const SL_BYTEORDER_BIGENDIAN: SLuint32 = 0x00000001;
120pub const SL_BYTEORDER_LITTLEENDIAN: SLuint32 = 0x00000002;
121
122pub const SL_CONTAINERTYPE_UNSPECIFIED: SLuint32 = 0x00000001;
123pub const SL_CONTAINERTYPE_RAW: SLuint32 = 0x00000002;
124pub const SL_CONTAINERTYPE_ASF: SLuint32 = 0x00000003;
125pub const SL_CONTAINERTYPE_AVI: SLuint32 = 0x00000004;
126pub const SL_CONTAINERTYPE_BMP: SLuint32 = 0x00000005;
127pub const SL_CONTAINERTYPE_JPG: SLuint32 = 0x00000006;
128pub const SL_CONTAINERTYPE_JPG2000: SLuint32 = 0x00000007;
129pub const SL_CONTAINERTYPE_M4A: SLuint32 = 0x00000008;
130pub const SL_CONTAINERTYPE_MP3: SLuint32 = 0x00000009;
131pub const SL_CONTAINERTYPE_MP4: SLuint32 = 0x0000000A;
132pub const SL_CONTAINERTYPE_MPEG_ES: SLuint32 = 0x0000000B;
133pub const SL_CONTAINERTYPE_MPEG_PS: SLuint32 = 0x0000000C;
134pub const SL_CONTAINERTYPE_MPEG_TS: SLuint32 = 0x0000000D;
135pub const SL_CONTAINERTYPE_QT: SLuint32 = 0x0000000E;
136pub const SL_CONTAINERTYPE_WAV: SLuint32 = 0x0000000F;
137pub const SL_CONTAINERTYPE_XMF_0: SLuint32 = 0x00000010;
138pub const SL_CONTAINERTYPE_XMF_1: SLuint32 = 0x00000011;
139pub const SL_CONTAINERTYPE_XMF_2: SLuint32 = 0x00000012;
140pub const SL_CONTAINERTYPE_XMF_3: SLuint32 = 0x00000013;
141pub const SL_CONTAINERTYPE_XMF_GENERIC: SLuint32 = 0x00000014;
142pub const SL_CONTAINERTYPE_AMR: SLuint32 = 0x00000015;
143pub const SL_CONTAINERTYPE_AAC: SLuint32 = 0x00000016;
144pub const SL_CONTAINERTYPE_3GPP: SLuint32 = 0x00000017;
145pub const SL_CONTAINERTYPE_3GA: SLuint32 = 0x00000018;
146pub const SL_CONTAINERTYPE_RM: SLuint32 = 0x00000019;
147pub const SL_CONTAINERTYPE_DMF: SLuint32 = 0x0000001A;
148pub const SL_CONTAINERTYPE_SMF: SLuint32 = 0x0000001B;
149pub const SL_CONTAINERTYPE_MOBILE_DLS: SLuint32 = 0x0000001C;
150pub const SL_CONTAINERTYPE_OGG: SLuint32 = 0x0000001D;
151
152pub const SL_DEFAULTDEVICEID_AUDIOINPUT: SLuint32 = 0xFFFFFFFF;
153pub const SL_DEFAULTDEVICEID_AUDIOOUTPUT: SLuint32 = 0xFFFFFFFE;
154pub const SL_DEFAULTDEVICEID_LED: SLuint32 = 0xFFFFFFFD;
155pub const SL_DEFAULTDEVICEID_VIBRA: SLuint32 = 0xFFFFFFFC;
156pub const SL_DEFAULTDEVICEID_RESERVED1: SLuint32 = 0xFFFFFFFB;
157
158pub const SL_DEVCONNECTION_INTEGRATED: SLint16 = 0x0001;
159pub const SL_DEVCONNECTION_ATTACHED_WIRED: SLint16 = 0x0100;
160pub const SL_DEVCONNECTION_ATTACHED_WIRELESS: SLint16 = 0x0200;
161pub const SL_DEVCONNECTION_NETWORK: SLint16 = 0x0400;
162
163pub const SL_DEVLOCATION_HANDSET: SLuint16 = 0x0001;
164pub const SL_DEVLOCATION_HEADSET: SLuint16 = 0x0002;
165pub const SL_DEVLOCATION_CARKIT: SLuint16 = 0x0003;
166pub const SL_DEVLOCATION_DOCK: SLuint16 = 0x0004;
167pub const SL_DEVLOCATION_REMOTE: SLuint16 = 0x0005;
168pub const SL_DEVLOCATION_RESLTE: SLuint16 = 0x0005;
170
171pub const SL_DEVSCOPE_UNKNOWN: SLuint16 = 0x0001;
172pub const SL_DEVSCOPE_ENVIRONMENT: SLuint16 = 0x0002;
173pub const SL_DEVSCOPE_USER: SLuint16 = 0x0003;
174
175pub const SL_CHARACTERENCODING_UNKNOWN: SLuint32 = 0x00000000;
176pub const SL_CHARACTERENCODING_BINARY: SLuint32 = 0x00000001;
177pub const SL_CHARACTERENCODING_ASCII: SLuint32 = 0x00000002;
178pub const SL_CHARACTERENCODING_BIG5: SLuint32 = 0x00000003;
179pub const SL_CHARACTERENCODING_CODEPAGE1252: SLuint32 = 0x00000004;
180pub const SL_CHARACTERENCODING_GB2312: SLuint32 = 0x00000005;
181pub const SL_CHARACTERENCODING_HZGB2312: SLuint32 = 0x00000006;
182pub const SL_CHARACTERENCODING_GB12345: SLuint32 = 0x00000007;
183pub const SL_CHARACTERENCODING_GB18030: SLuint32 = 0x00000008;
184pub const SL_CHARACTERENCODING_GBK: SLuint32 = 0x00000009;
185pub const SL_CHARACTERENCODING_IMAPUTF7: SLuint32 = 0x0000000A;
186pub const SL_CHARACTERENCODING_ISO2022JP: SLuint32 = 0x0000000B;
187pub const SL_CHARACTERENCODING_ISO2022JP1: SLuint32 = 0x0000000B;
188pub const SL_CHARACTERENCODING_ISO88591: SLuint32 = 0x0000000C;
189pub const SL_CHARACTERENCODING_ISO885910: SLuint32 = 0x0000000D;
190pub const SL_CHARACTERENCODING_ISO885913: SLuint32 = 0x0000000E;
191pub const SL_CHARACTERENCODING_ISO885914: SLuint32 = 0x0000000F;
192pub const SL_CHARACTERENCODING_ISO885915: SLuint32 = 0x00000010;
193pub const SL_CHARACTERENCODING_ISO88592: SLuint32 = 0x00000011;
194pub const SL_CHARACTERENCODING_ISO88593: SLuint32 = 0x00000012;
195pub const SL_CHARACTERENCODING_ISO88594: SLuint32 = 0x00000013;
196pub const SL_CHARACTERENCODING_ISO88595: SLuint32 = 0x00000014;
197pub const SL_CHARACTERENCODING_ISO88596: SLuint32 = 0x00000015;
198pub const SL_CHARACTERENCODING_ISO88597: SLuint32 = 0x00000016;
199pub const SL_CHARACTERENCODING_ISO88598: SLuint32 = 0x00000017;
200pub const SL_CHARACTERENCODING_ISO88599: SLuint32 = 0x00000018;
201pub const SL_CHARACTERENCODING_ISOEUCJP: SLuint32 = 0x00000019;
202pub const SL_CHARACTERENCODING_SHIFTJIS: SLuint32 = 0x0000001A;
203pub const SL_CHARACTERENCODING_SMS7BIT: SLuint32 = 0x0000001B;
204pub const SL_CHARACTERENCODING_UTF7: SLuint32 = 0x0000001C;
205pub const SL_CHARACTERENCODING_UTF8: SLuint32 = 0x0000001D;
206pub const SL_CHARACTERENCODING_JAVACONFORMANTUTF8: SLuint32 = 0x0000001E;
207pub const SL_CHARACTERENCODING_UTF16BE: SLuint32 = 0x0000001F;
208pub const SL_CHARACTERENCODING_UTF16LE: SLuint32 = 0x00000020;
209
210pub const SL_METADATA_FILTER_KEY: SLuint8 = 0x01;
211pub const SL_METADATA_FILTER_LANG: SLuint8 = 0x02;
212pub const SL_METADATA_FILTER_ENCODING: SLuint8 = 0x04;
213
214pub const SL_METADATATRAVERSALMODE_ALL: SLuint32 = 0x00000001;
215pub const SL_METADATATRAVERSALMODE_NODE: SLuint32 = 0x00000002;
216
217pub const SL_NODETYPE_UNSPECIFIED: SLuint32 = 0x00000001;
218pub const SL_NODETYPE_AUDIO: SLuint32 = 0x00000002;
219pub const SL_NODETYPE_VIDEO: SLuint32 = 0x00000003;
220pub const SL_NODETYPE_IMAGE: SLuint32 = 0x00000004;
221
222pub const SL_PLAYSTATE_STOPPED: SLuint32 = 0x00000001;
223pub const SL_PLAYSTATE_PAUSED: SLuint32 = 0x00000002;
224pub const SL_PLAYSTATE_PLAYING: SLuint32 = 0x00000003;
225
226pub const SL_PLAYEVENT_HEADATEND: SLuint32 = 0x00000001;
227pub const SL_PLAYEVENT_HEADATMARKER: SLuint32 = 0x00000002;
228pub const SL_PLAYEVENT_HEADATNEWPOS: SLuint32 = 0x00000004;
229pub const SL_PLAYEVENT_HEADMOVING: SLuint32 = 0x00000008;
230pub const SL_PLAYEVENT_HEADSTALLED: SLuint32 = 0x00000010;
231
232pub const SL_TIME_UNKNOWN: SLuint32 = 0xFFFFFFFF;
233
234pub const SL_PREFETCHEVENT_STATUSCHANGE: SLuint32 = 0x00000001;
235pub const SL_PREFETCHEVENT_FILLLEVELCHANGE: SLuint32 = 0x00000002;
236
237pub const SL_PREFETCHSTATUS_UNDERFLOW: SLuint32 = 0x00000001;
238pub const SL_PREFETCHSTATUS_SUFFICIENTDATA: SLuint32 = 0x00000002;
239pub const SL_PREFETCHSTATUS_OVERFLOW: SLuint32 = 0x00000003;
240
241pub const SL_SEEKMODE_FAST: SLuint32 = 0x0001;
242pub const SL_SEEKMODE_ACCURATE: SLuint32 = 0x0002;
243
244pub const SL_RECORDSTATE_STOPPED: SLuint32 = 0x00000001;
245pub const SL_RECORDSTATE_PAUSED: SLuint32 = 0x00000002;
246pub const SL_RECORDSTATE_RECORDING: SLuint32 = 0x00000003;
247
248pub const SL_RECORDEVENT_HEADATLIMIT: SLuint32 = 0x00000001;
249pub const SL_RECORDEVENT_HEADATMARKER: SLuint32 = 0x00000002;
250pub const SL_RECORDEVENT_HEADATNEWPOS: SLuint32 = 0x00000004;
251pub const SL_RECORDEVENT_HEADMOVING: SLuint32 = 0x00000008;
252pub const SL_RECORDEVENT_HEADSTALLED: SLuint32 = 0x00000010;
253pub const SL_RECORDEVENT_BUFFER_INSUFFICIENT: SLuint32 = 0x00000020;
255pub const SL_RECORDEVENT_BUFFER_FULL: SLuint32 = 0x00000020;
256
257pub const SL_EQUALIZER_UNDEFINED: SLuint16 = 0xFFFF;
258
259pub const SL_REVERBPRESET_NONE: SLuint16 = 0x0000;
260pub const SL_REVERBPRESET_SMALLROOM: SLuint16 = 0x0001;
261pub const SL_REVERBPRESET_MEDIUMROOM: SLuint16 = 0x0002;
262pub const SL_REVERBPRESET_LARGEROOM: SLuint16 = 0x0003;
263pub const SL_REVERBPRESET_MEDIUMHALL: SLuint16 = 0x0004;
264pub const SL_REVERBPRESET_LARGEHALL: SLuint16 = 0x0005;
265pub const SL_REVERBPRESET_PLATE: SLuint16 = 0x0006;
266
267pub const SL_ROLLOFFMODEL_EXPONENTIAL: SLuint32 = 0x00000000;
268pub const SL_ROLLOFFMODEL_LINEAR: SLuint32 = 0x00000001;
269
270pub const SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR: SLuint32 = 0x00000001;
271pub const SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION: SLuint32 = 0x00000002;
272pub const SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST: SLuint32 = 0x00000003;
273pub const SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY: SLuint32 = 0x00000004;
274pub const SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE: SLuint32 = 0x00000005;
275
276pub const SL_MIDIMESSAGETYPE_NOTE_ON_OFF: SLuint32 = 0x00000001;
277pub const SL_MIDIMESSAGETYPE_POLY_PRESSURE: SLuint32 = 0x00000002;
278pub const SL_MIDIMESSAGETYPE_CONTROL_CHANGE: SLuint32 = 0x00000003;
279pub const SL_MIDIMESSAGETYPE_PROGRAM_CHANGE: SLuint32 = 0x00000004;
280pub const SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE: SLuint32 = 0x00000005;
281pub const SL_MIDIMESSAGETYPE_PITCH_BEND: SLuint32 = 0x00000006;
282pub const SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE: SLuint32 = 0x00000007;
283
284pub const SL_RATECONTROLMODE_CONSTANTBITRATE: SLuint32 = 0x00000001;
285pub const SL_RATECONTROLMODE_VARIABLEBITRATE: SLuint32 = 0x00000002;
286
287pub const SL_AUDIOCODEC_PCM: SLuint32 = 0x00000001;
288pub const SL_AUDIOCODEC_MP3: SLuint32 = 0x00000002;
289pub const SL_AUDIOCODEC_AMR: SLuint32 = 0x00000003;
290pub const SL_AUDIOCODEC_AMRWB: SLuint32 = 0x00000004;
291pub const SL_AUDIOCODEC_AMRWBPLUS: SLuint32 = 0x00000005;
292pub const SL_AUDIOCODEC_AAC: SLuint32 = 0x00000006;
293pub const SL_AUDIOCODEC_WMA: SLuint32 = 0x00000007;
294pub const SL_AUDIOCODEC_REAL: SLuint32 = 0x00000008;
295
296pub const SL_AUDIOPROFILE_PCM: SLuint32 = 0x00000001;
297
298pub const SL_AUDIOPROFILE_MPEG1_L3: SLuint32 = 0x00000001;
299pub const SL_AUDIOPROFILE_MPEG2_L3: SLuint32 = 0x00000002;
300pub const SL_AUDIOPROFILE_MPEG25_L3: SLuint32 = 0x00000003;
301
302pub const SL_AUDIOCHANMODE_MP3_MONO: SLuint32 = 0x00000001;
303pub const SL_AUDIOCHANMODE_MP3_STEREO: SLuint32 = 0x00000002;
304pub const SL_AUDIOCHANMODE_MP3_JOINTSTEREO: SLuint32 = 0x00000003;
305pub const SL_AUDIOCHANMODE_MP3_DUAL: SLuint32 = 0x00000004;
306
307pub const SL_AUDIOPROFILE_AMR: SLuint32 = 0x00000001;
308
309pub const SL_AUDIOSTREAMFORMAT_CONFORMANCE: SLuint32 = 0x00000001;
310pub const SL_AUDIOSTREAMFORMAT_IF1: SLuint32 = 0x00000002;
311pub const SL_AUDIOSTREAMFORMAT_IF2: SLuint32 = 0x00000003;
312pub const SL_AUDIOSTREAMFORMAT_FSF: SLuint32 = 0x00000004;
313pub const SL_AUDIOSTREAMFORMAT_RTPPAYLOAD: SLuint32 = 0x00000005;
314pub const SL_AUDIOSTREAMFORMAT_ITU: SLuint32 = 0x00000006;
315
316pub const SL_AUDIOPROFILE_AMRWB: SLuint32 = 0x00000001;
317
318pub const SL_AUDIOPROFILE_AMRWBPLUS: SLuint32 = 0x00000001;
319
320pub const SL_AUDIOPROFILE_AAC_AAC: SLuint32 = 0x00000001;
321
322pub const SL_AUDIOMODE_AAC_MAIN: SLuint32 = 0x00000001;
323pub const SL_AUDIOMODE_AAC_LC: SLuint32 = 0x00000002;
324pub const SL_AUDIOMODE_AAC_SSR: SLuint32 = 0x00000003;
325pub const SL_AUDIOMODE_AAC_LTP: SLuint32 = 0x00000004;
326pub const SL_AUDIOMODE_AAC_HE: SLuint32 = 0x00000005;
327pub const SL_AUDIOMODE_AAC_SCALABLE: SLuint32 = 0x00000006;
328pub const SL_AUDIOMODE_AAC_ERLC: SLuint32 = 0x00000007;
329pub const SL_AUDIOMODE_AAC_LD: SLuint32 = 0x00000008;
330pub const SL_AUDIOMODE_AAC_HE_PS: SLuint32 = 0x00000009;
331pub const SL_AUDIOMODE_AAC_HE_MPS: SLuint32 = 0x0000000A;
332
333pub const SL_AUDIOSTREAMFORMAT_MP2ADTS: SLuint32 = 0x00000001;
334pub const SL_AUDIOSTREAMFORMAT_MP4ADTS: SLuint32 = 0x00000002;
335pub const SL_AUDIOSTREAMFORMAT_MP4LOAS: SLuint32 = 0x00000003;
336pub const SL_AUDIOSTREAMFORMAT_MP4LATM: SLuint32 = 0x00000004;
337pub const SL_AUDIOSTREAMFORMAT_ADIF: SLuint32 = 0x00000005;
338pub const SL_AUDIOSTREAMFORMAT_MP4FF: SLuint32 = 0x00000006;
339pub const SL_AUDIOSTREAMFORMAT_RAW: SLuint32 = 0x00000007;
340
341pub const SL_AUDIOPROFILE_WMA7: SLuint32 = 0x00000001;
342pub const SL_AUDIOPROFILE_WMA8: SLuint32 = 0x00000002;
343pub const SL_AUDIOPROFILE_WMA9: SLuint32 = 0x00000003;
344pub const SL_AUDIOPROFILE_WMA10: SLuint32 = 0x00000004;
345
346pub const SL_AUDIOMODE_WMA_LEVEL1: SLuint32 = 0x00000001;
347pub const SL_AUDIOMODE_WMA_LEVEL2: SLuint32 = 0x00000002;
348pub const SL_AUDIOMODE_WMA_LEVEL3: SLuint32 = 0x00000003;
349pub const SL_AUDIOMODE_WMA_LEVEL4: SLuint32 = 0x00000004;
350pub const SL_AUDIOMODE_WMAPRO_LEVELM0: SLuint32 = 0x00000005;
351pub const SL_AUDIOMODE_WMAPRO_LEVELM1: SLuint32 = 0x00000006;
352pub const SL_AUDIOMODE_WMAPRO_LEVELM2: SLuint32 = 0x00000007;
353pub const SL_AUDIOMODE_WMAPRO_LEVELM3: SLuint32 = 0x00000008;
354
355pub const SL_AUDIOPROFILE_REALAUDIO: SLuint32 = 0x00000001;
356
357pub const SL_AUDIOMODE_REALAUDIO_G2: SLuint32 = 0x00000001;
358pub const SL_AUDIOMODE_REALAUDIO_8: SLuint32 = 0x00000002;
359pub const SL_AUDIOMODE_REALAUDIO_10: SLuint32 = 0x00000003;
360pub const SL_AUDIOMODE_REALAUDIO_SURROUND: SLuint32 = 0x00000004;
361
362pub const SL_ENGINEOPTION_THREADSAFE: SLuint32 = 0x00000001;
363pub const SL_ENGINEOPTION_LOSSOFCONTROL: SLuint32 = 0x00000002;
364
365#[derive(Debug, Copy, Clone, PartialEq)]
367pub enum SLResult {
368 Success,
369 PreconditionsViolated,
370 ParameterInvalid,
371 MemoryFailure,
372 ResourceError,
373 ResourceLost,
374 IoError,
375 BufferInsufficient,
376 ContentCorrupted,
377 ContentUnsupported,
378 ContentNotFound,
379 PermissionDenied,
380 FeatureUnsupported,
381 InternalError,
382 UnknownError,
383 OperationAborted,
384 ControlLost,
385}
386
387impl From<bindings::SLresult> for SLResult {
388 fn from(res: bindings::SLresult) -> Self {
389 match res {
390 0 => SLResult::Success,
391 1 => SLResult::PreconditionsViolated,
392 2 => SLResult::ParameterInvalid,
393 3 => SLResult::MemoryFailure,
394 4 => SLResult::ResourceError,
395 5 => SLResult::ResourceLost,
396 6 => SLResult::IoError,
397 7 => SLResult::BufferInsufficient,
398 8 => SLResult::ContentCorrupted,
399 9 => SLResult::ContentUnsupported,
400 10 => SLResult::ContentNotFound,
401 11 => SLResult::PermissionDenied,
402 12 => SLResult::FeatureUnsupported,
403 13 => SLResult::InternalError,
404 14 => SLResult::UnknownError,
405 15 => SLResult::OperationAborted,
406 16 => SLResult::ControlLost,
407 _ => SLResult::UnknownError
408 }
409 }
410}