1 /* automatically generated by rust-bindgen 0.59.1 */
2
3 pub type std_string = [u64; 3usize];
4 pub type __uint8_t = ::std::os::raw::c_uchar;
5 pub type __uint16_t = ::std::os::raw::c_ushort;
6 pub type __int32_t = ::std::os::raw::c_int;
7 pub type __uint32_t = ::std::os::raw::c_uint;
8 pub type __int64_t = ::std::os::raw::c_long;
9 pub const oboe_StreamState_Uninitialized: oboe_StreamState = 0;
10 pub const oboe_StreamState_Unknown: oboe_StreamState = 1;
11 pub const oboe_StreamState_Open: oboe_StreamState = 2;
12 pub const oboe_StreamState_Starting: oboe_StreamState = 3;
13 pub const oboe_StreamState_Started: oboe_StreamState = 4;
14 pub const oboe_StreamState_Pausing: oboe_StreamState = 5;
15 pub const oboe_StreamState_Paused: oboe_StreamState = 6;
16 pub const oboe_StreamState_Flushing: oboe_StreamState = 7;
17 pub const oboe_StreamState_Flushed: oboe_StreamState = 8;
18 pub const oboe_StreamState_Stopping: oboe_StreamState = 9;
19 pub const oboe_StreamState_Stopped: oboe_StreamState = 10;
20 pub const oboe_StreamState_Closing: oboe_StreamState = 11;
21 pub const oboe_StreamState_Closed: oboe_StreamState = 12;
22 pub const oboe_StreamState_Disconnected: oboe_StreamState = 13;
23 #[doc = " The state of the audio stream."]
24 pub type oboe_StreamState = i32;
25 #[doc = " Used for playback."]
26 pub const oboe_Direction_Output: oboe_Direction = 0;
27 #[doc = " Used for recording."]
28 pub const oboe_Direction_Input: oboe_Direction = 1;
29 #[doc = " The direction of the stream."]
30 pub type oboe_Direction = i32;
31 #[doc = " Invalid format."]
32 pub const oboe_AudioFormat_Invalid: oboe_AudioFormat = -1;
33 #[doc = " Unspecified format. Format will be decided by Oboe."]
34 pub const oboe_AudioFormat_Unspecified: oboe_AudioFormat = 0;
35 #[doc = " Signed 16-bit integers."]
36 pub const oboe_AudioFormat_I16: oboe_AudioFormat = 1;
37 #[doc = " Single precision floating point."]
38 #[doc = ""]
39 #[doc = " This is the recommended format for most applications."]
40 #[doc = " But note that the use of Float may prevent the opening of"]
41 #[doc = " a low-latency input path on OpenSL ES or Legacy AAudio streams."]
42 pub const oboe_AudioFormat_Float: oboe_AudioFormat = 2;
43 #[doc = " Signed 24-bit integers, packed into 3 bytes."]
44 #[doc = ""]
45 #[doc = " Note that the use of this format does not guarantee that"]
46 #[doc = " the full precision will be provided. The underlying device may"]
47 #[doc = " be using I16 format."]
48 #[doc = ""]
49 #[doc = " Added in API 31 (S)."]
50 pub const oboe_AudioFormat_I24: oboe_AudioFormat = 3;
51 #[doc = " Signed 32-bit integers."]
52 #[doc = ""]
53 #[doc = " Note that the use of this format does not guarantee that"]
54 #[doc = " the full precision will be provided. The underlying device may"]
55 #[doc = " be using I16 format."]
56 #[doc = ""]
57 #[doc = " Added in API 31 (S)."]
58 pub const oboe_AudioFormat_I32: oboe_AudioFormat = 4;
59 #[doc = " The format of audio samples."]
60 pub type oboe_AudioFormat = i32;
61 pub const oboe_DataCallbackResult_Continue: oboe_DataCallbackResult = 0;
62 pub const oboe_DataCallbackResult_Stop: oboe_DataCallbackResult = 1;
63 #[doc = " The result of an audio callback."]
64 pub type oboe_DataCallbackResult = i32;
65 pub const oboe_Result_OK: oboe_Result = 0;
66 pub const oboe_Result_ErrorBase: oboe_Result = -900;
67 pub const oboe_Result_ErrorDisconnected: oboe_Result = -899;
68 pub const oboe_Result_ErrorIllegalArgument: oboe_Result = -898;
69 pub const oboe_Result_ErrorInternal: oboe_Result = -896;
70 pub const oboe_Result_ErrorInvalidState: oboe_Result = -895;
71 pub const oboe_Result_ErrorInvalidHandle: oboe_Result = -892;
72 pub const oboe_Result_ErrorUnimplemented: oboe_Result = -890;
73 pub const oboe_Result_ErrorUnavailable: oboe_Result = -889;
74 pub const oboe_Result_ErrorNoFreeHandles: oboe_Result = -888;
75 pub const oboe_Result_ErrorNoMemory: oboe_Result = -887;
76 pub const oboe_Result_ErrorNull: oboe_Result = -886;
77 pub const oboe_Result_ErrorTimeout: oboe_Result = -885;
78 pub const oboe_Result_ErrorWouldBlock: oboe_Result = -884;
79 pub const oboe_Result_ErrorInvalidFormat: oboe_Result = -883;
80 pub const oboe_Result_ErrorOutOfRange: oboe_Result = -882;
81 pub const oboe_Result_ErrorNoService: oboe_Result = -881;
82 pub const oboe_Result_ErrorInvalidRate: oboe_Result = -880;
83 pub const oboe_Result_Reserved1: oboe_Result = -879;
84 pub const oboe_Result_Reserved2: oboe_Result = -878;
85 pub const oboe_Result_Reserved3: oboe_Result = -877;
86 pub const oboe_Result_Reserved4: oboe_Result = -876;
87 pub const oboe_Result_Reserved5: oboe_Result = -875;
88 pub const oboe_Result_Reserved6: oboe_Result = -874;
89 pub const oboe_Result_Reserved7: oboe_Result = -873;
90 pub const oboe_Result_Reserved8: oboe_Result = -872;
91 pub const oboe_Result_Reserved9: oboe_Result = -871;
92 pub const oboe_Result_Reserved10: oboe_Result = -870;
93 pub const oboe_Result_ErrorClosed: oboe_Result = -869;
94 #[doc = " The result of an operation. All except the `OK` result indicates that an error occurred."]
95 #[doc = " The `Result` can be converted into a human readable string using `convertToText`."]
96 pub type oboe_Result = i32;
97 #[doc = " This will be the only stream using a particular source or sink."]
98 #[doc = " This mode will provide the lowest possible latency."]
99 #[doc = " You should close EXCLUSIVE streams immediately when you are not using them."]
100 #[doc = ""]
101 #[doc = " If you do not need the lowest possible latency then we recommend using Shared,"]
102 #[doc = " which is the default."]
103 pub const oboe_SharingMode_Exclusive: oboe_SharingMode = 0;
104 #[doc = " Multiple applications can share the same device."]
105 #[doc = " The data from output streams will be mixed by the audio service."]
106 #[doc = " The data for input streams will be distributed by the audio service."]
107 #[doc = ""]
108 #[doc = " This will have higher latency than the EXCLUSIVE mode."]
109 pub const oboe_SharingMode_Shared: oboe_SharingMode = 1;
110 #[doc = " The sharing mode of the audio stream."]
111 pub type oboe_SharingMode = i32;
112 #[doc = " No particular performance needs. Default."]
113 pub const oboe_PerformanceMode_None: oboe_PerformanceMode = 10;
114 #[doc = " Extending battery life is most important."]
115 pub const oboe_PerformanceMode_PowerSaving: oboe_PerformanceMode = 11;
116 #[doc = " Reducing latency is most important."]
117 pub const oboe_PerformanceMode_LowLatency: oboe_PerformanceMode = 12;
118 #[doc = " The performance mode of the audio stream."]
119 pub type oboe_PerformanceMode = i32;
120 #[doc = " Try to use AAudio. If not available then use OpenSL ES."]
121 pub const oboe_AudioApi_Unspecified: oboe_AudioApi = 0;
122 #[doc = " Use OpenSL ES."]
123 pub const oboe_AudioApi_OpenSLES: oboe_AudioApi = 1;
124 #[doc = " Try to use AAudio. Fail if unavailable."]
125 pub const oboe_AudioApi_AAudio: oboe_AudioApi = 2;
126 #[doc = " The underlying audio API used by the audio stream."]
127 pub type oboe_AudioApi = i32;
128 #[doc = " No conversion by Oboe. Underlying APIs may still do conversion."]
129 pub const oboe_SampleRateConversionQuality_None: oboe_SampleRateConversionQuality = 0;
130 #[doc = " Fastest conversion but may not sound great."]
131 #[doc = " This may be implemented using bilinear interpolation."]
132 pub const oboe_SampleRateConversionQuality_Fastest: oboe_SampleRateConversionQuality = 1;
133 #[doc = " Fastest conversion but may not sound great."]
134 #[doc = " This may be implemented using bilinear interpolation."]
135 pub const oboe_SampleRateConversionQuality_Low: oboe_SampleRateConversionQuality = 2;
136 #[doc = " Fastest conversion but may not sound great."]
137 #[doc = " This may be implemented using bilinear interpolation."]
138 pub const oboe_SampleRateConversionQuality_Medium: oboe_SampleRateConversionQuality = 3;
139 #[doc = " Fastest conversion but may not sound great."]
140 #[doc = " This may be implemented using bilinear interpolation."]
141 pub const oboe_SampleRateConversionQuality_High: oboe_SampleRateConversionQuality = 4;
142 #[doc = " Highest quality conversion, which may be expensive in terms of CPU."]
143 pub const oboe_SampleRateConversionQuality_Best: oboe_SampleRateConversionQuality = 5;
144 #[doc = " Specifies the quality of the sample rate conversion performed by Oboe."]
145 #[doc = " Higher quality will require more CPU load."]
146 #[doc = " Higher quality conversion will probably be implemented using a sinc based resampler."]
147 pub type oboe_SampleRateConversionQuality = i32;
148 #[doc = " Use this for streaming media, music performance, video, podcasts, etcetera."]
149 pub const oboe_Usage_Media: oboe_Usage = 1;
150 #[doc = " Use this for voice over IP, telephony, etcetera."]
151 pub const oboe_Usage_VoiceCommunication: oboe_Usage = 2;
152 #[doc = " Use this for sounds associated with telephony such as busy tones, DTMF, etcetera."]
153 pub const oboe_Usage_VoiceCommunicationSignalling: oboe_Usage = 3;
154 #[doc = " Use this to demand the users attention."]
155 pub const oboe_Usage_Alarm: oboe_Usage = 4;
156 #[doc = " Use this for notifying the user when a message has arrived or some"]
157 #[doc = " other background event has occured."]
158 pub const oboe_Usage_Notification: oboe_Usage = 5;
159 #[doc = " Use this when the phone rings."]
160 pub const oboe_Usage_NotificationRingtone: oboe_Usage = 6;
161 #[doc = " Use this to attract the users attention when, for example, the battery is low."]
162 pub const oboe_Usage_NotificationEvent: oboe_Usage = 10;
163 #[doc = " Use this for screen readers, etcetera."]
164 pub const oboe_Usage_AssistanceAccessibility: oboe_Usage = 11;
165 #[doc = " Use this for driving or navigation directions."]
166 pub const oboe_Usage_AssistanceNavigationGuidance: oboe_Usage = 12;
167 #[doc = " Use this for user interface sounds, beeps, etcetera."]
168 pub const oboe_Usage_AssistanceSonification: oboe_Usage = 13;
169 #[doc = " Use this for game audio and sound effects."]
170 pub const oboe_Usage_Game: oboe_Usage = 14;
171 #[doc = " Use this for audio responses to user queries, audio instructions or help utterances."]
172 pub const oboe_Usage_Assistant: oboe_Usage = 16;
173 #[doc = " The Usage attribute expresses *why* you are playing a sound, what is this sound used for."]
174 #[doc = " This information is used by certain platforms or routing policies"]
175 #[doc = " to make more refined volume or routing decisions."]
176 #[doc = ""]
177 #[doc = " Note that these match the equivalent values in AudioAttributes in the Android Java API."]
178 #[doc = ""]
179 #[doc = " This attribute only has an effect on Android API 28+."]
180 pub type oboe_Usage = i32;
181 #[doc = " Use this for spoken voice, audio books, etcetera."]
182 pub const oboe_ContentType_Speech: oboe_ContentType = 1;
183 #[doc = " Use this for pre-recorded or live music."]
184 pub const oboe_ContentType_Music: oboe_ContentType = 2;
185 #[doc = " Use this for a movie or video soundtrack."]
186 pub const oboe_ContentType_Movie: oboe_ContentType = 3;
187 #[doc = " Use this for sound is designed to accompany a user action,"]
188 #[doc = " such as a click or beep sound made when the user presses a button."]
189 pub const oboe_ContentType_Sonification: oboe_ContentType = 4;
190 #[doc = " The ContentType attribute describes *what* you are playing."]
191 #[doc = " It expresses the general category of the content. This information is optional."]
192 #[doc = " But in case it is known (for instance {@link Movie} for a"]
193 #[doc = " movie streaming service or {@link Speech} for"]
194 #[doc = " an audio book application) this information might be used by the audio framework to"]
195 #[doc = " enforce audio focus."]
196 #[doc = ""]
197 #[doc = " Note that these match the equivalent values in AudioAttributes in the Android Java API."]
198 #[doc = ""]
199 #[doc = " This attribute only has an effect on Android API 28+."]
200 pub type oboe_ContentType = i32;
201 #[doc = " Use this preset when other presets do not apply."]
202 pub const oboe_InputPreset_Generic: oboe_InputPreset = 1;
203 #[doc = " Use this preset when recording video."]
204 pub const oboe_InputPreset_Camcorder: oboe_InputPreset = 5;
205 #[doc = " Use this preset when doing speech recognition."]
206 pub const oboe_InputPreset_VoiceRecognition: oboe_InputPreset = 6;
207 #[doc = " Use this preset when doing telephony or voice messaging."]
208 pub const oboe_InputPreset_VoiceCommunication: oboe_InputPreset = 7;
209 #[doc = " Use this preset to obtain an input with no effects."]
210 #[doc = " Note that this input will not have automatic gain control"]
211 #[doc = " so the recorded volume may be very low."]
212 pub const oboe_InputPreset_Unprocessed: oboe_InputPreset = 9;
213 #[doc = " Use this preset for capturing audio meant to be processed in real time"]
214 #[doc = " and played back for live performance (e.g karaoke)."]
215 #[doc = " The capture path will minimize latency and coupling with playback path."]
216 pub const oboe_InputPreset_VoicePerformance: oboe_InputPreset = 10;
217 #[doc = " Defines the audio source."]
218 #[doc = " An audio source defines both a default physical source of audio signal, and a recording"]
219 #[doc = " configuration."]
220 #[doc = ""]
221 #[doc = " Note that these match the equivalent values in MediaRecorder.AudioSource in the Android Java API."]
222 #[doc = ""]
223 #[doc = " This attribute only has an effect on Android API 28+."]
224 pub type oboe_InputPreset = i32;
225 #[doc = " Do not allocate a session ID."]
226 #[doc = " Effects cannot be used with this stream."]
227 #[doc = " Default."]
228 pub const oboe_SessionId_None: oboe_SessionId = -1;
229 #[doc = " Allocate a session ID that can be used to attach and control"]
230 #[doc = " effects using the Java AudioEffects API."]
231 #[doc = " Note that the use of this flag may result in higher latency."]
232 #[doc = ""]
233 #[doc = " Note that this matches the value of AudioManager.AUDIO_SESSION_ID_GENERATE."]
234 pub const oboe_SessionId_Allocate: oboe_SessionId = 0;
235 #[doc = " This attribute can be used to allocate a session ID to the audio stream."]
236 #[doc = ""]
237 #[doc = " This attribute only has an effect on Android API 28+."]
238 pub type oboe_SessionId = ::std::os::raw::c_int;
239 #[doc = " Audio channel count definition, use Mono or Stereo"]
240 pub const oboe_ChannelCount_Unspecified: oboe_ChannelCount = 0;
241 #[doc = " Use this for mono audio"]
242 pub const oboe_ChannelCount_Mono: oboe_ChannelCount = 1;
243 #[doc = " Use this for stereo audio."]
244 pub const oboe_ChannelCount_Stereo: oboe_ChannelCount = 2;
245 #[doc = " The channel count of the audio stream. The underlying type is `int32_t`."]
246 #[doc = " Use of this enum is convenient to avoid \"magic\""]
247 #[doc = " numbers when specifying the channel count."]
248 #[doc = ""]
249 #[doc = " For example, you can write"]
250 #[doc = " `builder.setChannelCount(ChannelCount::Stereo)`"]
251 #[doc = " rather than `builder.setChannelCount(2)`"]
252 #[doc = ""]
253 pub type oboe_ChannelCount = i32;
254 #[doc = " On API 16 to 26 OpenSL ES will be used. When using OpenSL ES the optimal values for sampleRate and"]
255 #[doc = " framesPerBurst are not known by the native code."]
256 #[doc = " On API 17+ these values should be obtained from the AudioManager using this code:"]
257 #[doc = ""]
258 #[doc = " <pre><code>"]
259 #[doc = " // Note that this technique only works for built-in speakers and headphones."]
260 #[doc = " AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE);"]
261 #[doc = " String sampleRateStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);"]
262 #[doc = " int defaultSampleRate = Integer.parseInt(sampleRateStr);"]
263 #[doc = " String framesPerBurstStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);"]
264 #[doc = " int defaultFramesPerBurst = Integer.parseInt(framesPerBurstStr);"]
265 #[doc = " </code></pre>"]
266 #[doc = ""]
267 #[doc = " It can then be passed down to Oboe through JNI."]
268 #[doc = ""]
269 #[doc = " AAudio will get the optimal framesPerBurst from the HAL and will ignore this value."]
270 #[repr(C)]
271 #[derive(Debug, Copy, Clone)]
272 pub struct oboe_DefaultStreamValues {
273 pub _address: u8,
274 }
275 extern "C" {
276 #[doc = " The default sample rate to use when opening new audio streams"]
277 #[link_name = "\u{1}_ZN4oboe19DefaultStreamValues10SampleRateE"]
278 pub static mut oboe_DefaultStreamValues_SampleRate: i32;
279 }
280 extern "C" {
281 #[doc = " The default frames per burst to use when opening new audio streams"]
282 #[link_name = "\u{1}_ZN4oboe19DefaultStreamValues14FramesPerBurstE"]
283 pub static mut oboe_DefaultStreamValues_FramesPerBurst: i32;
284 }
285 extern "C" {
286 #[doc = " The default channel count to use when opening new audio streams"]
287 #[link_name = "\u{1}_ZN4oboe19DefaultStreamValues12ChannelCountE"]
288 pub static mut oboe_DefaultStreamValues_ChannelCount: i32;
289 }
290 #[test]
bindgen_test_layout_oboe_DefaultStreamValues()291 fn bindgen_test_layout_oboe_DefaultStreamValues() {
292 assert_eq!(
293 ::std::mem::size_of::<oboe_DefaultStreamValues>(),
294 1usize,
295 concat!("Size of: ", stringify!(oboe_DefaultStreamValues))
296 );
297 assert_eq!(
298 ::std::mem::align_of::<oboe_DefaultStreamValues>(),
299 1usize,
300 concat!("Alignment of ", stringify!(oboe_DefaultStreamValues))
301 );
302 }
303 #[doc = " The time at which the frame at `position` was presented"]
304 #[repr(C)]
305 #[derive(Debug, Copy, Clone)]
306 pub struct oboe_FrameTimestamp {
307 pub position: i64,
308 pub timestamp: i64,
309 }
310 #[test]
bindgen_test_layout_oboe_FrameTimestamp()311 fn bindgen_test_layout_oboe_FrameTimestamp() {
312 assert_eq!(
313 ::std::mem::size_of::<oboe_FrameTimestamp>(),
314 16usize,
315 concat!("Size of: ", stringify!(oboe_FrameTimestamp))
316 );
317 assert_eq!(
318 ::std::mem::align_of::<oboe_FrameTimestamp>(),
319 8usize,
320 concat!("Alignment of ", stringify!(oboe_FrameTimestamp))
321 );
322 assert_eq!(
323 unsafe { &(*(::std::ptr::null::<oboe_FrameTimestamp>())).position as *const _ as usize },
324 0usize,
325 concat!(
326 "Offset of field: ",
327 stringify!(oboe_FrameTimestamp),
328 "::",
329 stringify!(position)
330 )
331 );
332 assert_eq!(
333 unsafe { &(*(::std::ptr::null::<oboe_FrameTimestamp>())).timestamp as *const _ as usize },
334 8usize,
335 concat!(
336 "Offset of field: ",
337 stringify!(oboe_FrameTimestamp),
338 "::",
339 stringify!(timestamp)
340 )
341 );
342 }
343 #[doc = " A ResultWithValue can store both the result of an operation (either OK or an error) and a value."]
344 #[doc = ""]
345 #[doc = " It has been designed for cases where the caller needs to know whether an operation succeeded and,"]
346 #[doc = " if it did, a value which was obtained during the operation."]
347 #[doc = ""]
348 #[doc = " For example, when reading from a stream the caller needs to know the result of the read operation"]
349 #[doc = " and, if it was successful, how many frames were read. Note that ResultWithValue can be evaluated"]
350 #[doc = " as a boolean so it's simple to check whether the result is OK."]
351 #[doc = ""]
352 #[doc = " <code>"]
353 #[doc = " ResultWithValue<int32_t> resultOfRead = myStream.read(&buffer, numFrames, timeoutNanoseconds);"]
354 #[doc = ""]
355 #[doc = " if (resultOfRead) {"]
356 #[doc = " LOGD(\"Frames read: %d\", resultOfRead.value());"]
357 #[doc = " } else {"]
358 #[doc = " LOGD(\"Error reading from stream: %s\", resultOfRead.error());"]
359 #[doc = " }"]
360 #[doc = " </code>"]
361 #[repr(C)]
362 #[derive(Debug, Copy, Clone)]
363 pub struct oboe_ResultWithValue<T> {
364 pub mValue: T,
365 pub mError: oboe_Result,
366 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
367 }
368 #[repr(C)]
369 pub struct oboe_AudioStreamDataCallback__bindgen_vtable(::std::os::raw::c_void);
370 #[doc = " AudioStreamDataCallback defines a callback interface for"]
371 #[doc = " moving data to/from an audio stream using `onAudioReady`"]
372 #[doc = " 2) being alerted when a stream has an error using `onError*` methods"]
373 #[doc = ""]
374 #[doc = " It is used with AudioStreamBuilder::setDataCallback()."]
375 #[repr(C)]
376 #[derive(Debug)]
377 pub struct oboe_AudioStreamDataCallback {
378 pub vtable_: *const oboe_AudioStreamDataCallback__bindgen_vtable,
379 }
380 #[test]
bindgen_test_layout_oboe_AudioStreamDataCallback()381 fn bindgen_test_layout_oboe_AudioStreamDataCallback() {
382 assert_eq!(
383 ::std::mem::size_of::<oboe_AudioStreamDataCallback>(),
384 8usize,
385 concat!("Size of: ", stringify!(oboe_AudioStreamDataCallback))
386 );
387 assert_eq!(
388 ::std::mem::align_of::<oboe_AudioStreamDataCallback>(),
389 8usize,
390 concat!("Alignment of ", stringify!(oboe_AudioStreamDataCallback))
391 );
392 }
393 #[repr(C)]
394 pub struct oboe_AudioStreamErrorCallback__bindgen_vtable(::std::os::raw::c_void);
395 #[doc = " AudioStreamErrorCallback defines a callback interface for"]
396 #[doc = " being alerted when a stream has an error or is disconnected"]
397 #[doc = " using `onError*` methods."]
398 #[doc = ""]
399 #[doc = " It is used with AudioStreamBuilder::setErrorCallback()."]
400 #[repr(C)]
401 #[derive(Debug)]
402 pub struct oboe_AudioStreamErrorCallback {
403 pub vtable_: *const oboe_AudioStreamErrorCallback__bindgen_vtable,
404 }
405 #[test]
bindgen_test_layout_oboe_AudioStreamErrorCallback()406 fn bindgen_test_layout_oboe_AudioStreamErrorCallback() {
407 assert_eq!(
408 ::std::mem::size_of::<oboe_AudioStreamErrorCallback>(),
409 8usize,
410 concat!("Size of: ", stringify!(oboe_AudioStreamErrorCallback))
411 );
412 assert_eq!(
413 ::std::mem::align_of::<oboe_AudioStreamErrorCallback>(),
414 8usize,
415 concat!("Alignment of ", stringify!(oboe_AudioStreamErrorCallback))
416 );
417 }
418 #[doc = " AudioStreamCallback defines a callback interface for:"]
419 #[doc = ""]
420 #[doc = " 1) moving data to/from an audio stream using `onAudioReady`"]
421 #[doc = " 2) being alerted when a stream has an error using `onError*` methods"]
422 #[doc = ""]
423 #[doc = " It is used with AudioStreamBuilder::setCallback()."]
424 #[doc = ""]
425 #[doc = " It combines the interfaces defined by AudioStreamDataCallback and AudioStreamErrorCallback."]
426 #[doc = " This was the original callback object. We now recommend using the individual interfaces"]
427 #[doc = " and using setDataCallback() and setErrorCallback()."]
428 #[doc = ""]
429 #[doc = " @deprecated Use `AudioStreamDataCallback` and `AudioStreamErrorCallback` instead"]
430 #[repr(C)]
431 #[derive(Debug)]
432 pub struct oboe_AudioStreamCallback {
433 pub _base: oboe_AudioStreamDataCallback,
434 pub _base_1: oboe_AudioStreamErrorCallback,
435 }
436 #[test]
bindgen_test_layout_oboe_AudioStreamCallback()437 fn bindgen_test_layout_oboe_AudioStreamCallback() {
438 assert_eq!(
439 ::std::mem::size_of::<oboe_AudioStreamCallback>(),
440 16usize,
441 concat!("Size of: ", stringify!(oboe_AudioStreamCallback))
442 );
443 assert_eq!(
444 ::std::mem::align_of::<oboe_AudioStreamCallback>(),
445 8usize,
446 concat!("Alignment of ", stringify!(oboe_AudioStreamCallback))
447 );
448 }
449 #[repr(C)]
450 pub struct oboe_AudioStreamBase__bindgen_vtable(::std::os::raw::c_void);
451 #[doc = " Base class containing parameters for audio streams and builders."]
452 #[repr(C)]
453 #[derive(Debug)]
454 pub struct oboe_AudioStreamBase {
455 pub vtable_: *const oboe_AudioStreamBase__bindgen_vtable,
456 #[doc = " The callback which will be fired when new data is ready to be read/written."]
457 pub mDataCallback: *mut oboe_AudioStreamDataCallback,
458 #[doc = " The callback which will be fired when an error or a disconnect occurs."]
459 pub mErrorCallback: *mut oboe_AudioStreamErrorCallback,
460 #[doc = " Number of audio frames which will be requested in each callback"]
461 pub mFramesPerCallback: i32,
462 #[doc = " Stream channel count"]
463 pub mChannelCount: i32,
464 #[doc = " Stream sample rate"]
465 pub mSampleRate: i32,
466 #[doc = " Stream audio device ID"]
467 pub mDeviceId: i32,
468 #[doc = " Stream buffer capacity specified as a number of audio frames"]
469 pub mBufferCapacityInFrames: i32,
470 #[doc = " Stream buffer size specified as a number of audio frames"]
471 pub mBufferSizeInFrames: i32,
472 #[doc = " Stream sharing mode"]
473 pub mSharingMode: oboe_SharingMode,
474 #[doc = " Format of audio frames"]
475 pub mFormat: oboe_AudioFormat,
476 #[doc = " Stream direction"]
477 pub mDirection: oboe_Direction,
478 #[doc = " Stream performance mode"]
479 pub mPerformanceMode: oboe_PerformanceMode,
480 #[doc = " Stream usage. Only active on Android 28+"]
481 pub mUsage: oboe_Usage,
482 #[doc = " Stream content type. Only active on Android 28+"]
483 pub mContentType: oboe_ContentType,
484 #[doc = " Stream input preset. Only active on Android 28+"]
485 #[doc = " TODO InputPreset::Unspecified should be considered as a possible default alternative."]
486 pub mInputPreset: oboe_InputPreset,
487 #[doc = " Stream session ID allocation strategy. Only active on Android 28+"]
488 pub mSessionId: oboe_SessionId,
489 #[doc = " Control the name of the package creating the stream. Only active on Android 31+"]
490 pub mPackageName: std_string,
491 #[doc = " Control the attribution tag of the context creating the stream. Only active on Android 31+"]
492 pub mAttributionTag: std_string,
493 pub mChannelConversionAllowed: bool,
494 pub mFormatConversionAllowed: bool,
495 pub mSampleRateConversionQuality: oboe_SampleRateConversionQuality,
496 }
497 #[test]
bindgen_test_layout_oboe_AudioStreamBase()498 fn bindgen_test_layout_oboe_AudioStreamBase() {
499 assert_eq!(
500 ::std::mem::size_of::<oboe_AudioStreamBase>(),
501 136usize,
502 concat!("Size of: ", stringify!(oboe_AudioStreamBase))
503 );
504 assert_eq!(
505 ::std::mem::align_of::<oboe_AudioStreamBase>(),
506 8usize,
507 concat!("Alignment of ", stringify!(oboe_AudioStreamBase))
508 );
509 assert_eq!(
510 unsafe {
511 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mDataCallback as *const _ as usize
512 },
513 8usize,
514 concat!(
515 "Offset of field: ",
516 stringify!(oboe_AudioStreamBase),
517 "::",
518 stringify!(mDataCallback)
519 )
520 );
521 assert_eq!(
522 unsafe {
523 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mErrorCallback as *const _ as usize
524 },
525 16usize,
526 concat!(
527 "Offset of field: ",
528 stringify!(oboe_AudioStreamBase),
529 "::",
530 stringify!(mErrorCallback)
531 )
532 );
533 assert_eq!(
534 unsafe {
535 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mFramesPerCallback as *const _ as usize
536 },
537 24usize,
538 concat!(
539 "Offset of field: ",
540 stringify!(oboe_AudioStreamBase),
541 "::",
542 stringify!(mFramesPerCallback)
543 )
544 );
545 assert_eq!(
546 unsafe {
547 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mChannelCount as *const _ as usize
548 },
549 28usize,
550 concat!(
551 "Offset of field: ",
552 stringify!(oboe_AudioStreamBase),
553 "::",
554 stringify!(mChannelCount)
555 )
556 );
557 assert_eq!(
558 unsafe {
559 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mSampleRate as *const _ as usize
560 },
561 32usize,
562 concat!(
563 "Offset of field: ",
564 stringify!(oboe_AudioStreamBase),
565 "::",
566 stringify!(mSampleRate)
567 )
568 );
569 assert_eq!(
570 unsafe { &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mDeviceId as *const _ as usize },
571 36usize,
572 concat!(
573 "Offset of field: ",
574 stringify!(oboe_AudioStreamBase),
575 "::",
576 stringify!(mDeviceId)
577 )
578 );
579 assert_eq!(
580 unsafe {
581 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mBufferCapacityInFrames as *const _
582 as usize
583 },
584 40usize,
585 concat!(
586 "Offset of field: ",
587 stringify!(oboe_AudioStreamBase),
588 "::",
589 stringify!(mBufferCapacityInFrames)
590 )
591 );
592 assert_eq!(
593 unsafe {
594 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mBufferSizeInFrames as *const _
595 as usize
596 },
597 44usize,
598 concat!(
599 "Offset of field: ",
600 stringify!(oboe_AudioStreamBase),
601 "::",
602 stringify!(mBufferSizeInFrames)
603 )
604 );
605 assert_eq!(
606 unsafe {
607 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mSharingMode as *const _ as usize
608 },
609 48usize,
610 concat!(
611 "Offset of field: ",
612 stringify!(oboe_AudioStreamBase),
613 "::",
614 stringify!(mSharingMode)
615 )
616 );
617 assert_eq!(
618 unsafe { &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mFormat as *const _ as usize },
619 52usize,
620 concat!(
621 "Offset of field: ",
622 stringify!(oboe_AudioStreamBase),
623 "::",
624 stringify!(mFormat)
625 )
626 );
627 assert_eq!(
628 unsafe { &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mDirection as *const _ as usize },
629 56usize,
630 concat!(
631 "Offset of field: ",
632 stringify!(oboe_AudioStreamBase),
633 "::",
634 stringify!(mDirection)
635 )
636 );
637 assert_eq!(
638 unsafe {
639 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mPerformanceMode as *const _ as usize
640 },
641 60usize,
642 concat!(
643 "Offset of field: ",
644 stringify!(oboe_AudioStreamBase),
645 "::",
646 stringify!(mPerformanceMode)
647 )
648 );
649 assert_eq!(
650 unsafe { &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mUsage as *const _ as usize },
651 64usize,
652 concat!(
653 "Offset of field: ",
654 stringify!(oboe_AudioStreamBase),
655 "::",
656 stringify!(mUsage)
657 )
658 );
659 assert_eq!(
660 unsafe {
661 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mContentType as *const _ as usize
662 },
663 68usize,
664 concat!(
665 "Offset of field: ",
666 stringify!(oboe_AudioStreamBase),
667 "::",
668 stringify!(mContentType)
669 )
670 );
671 assert_eq!(
672 unsafe {
673 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mInputPreset as *const _ as usize
674 },
675 72usize,
676 concat!(
677 "Offset of field: ",
678 stringify!(oboe_AudioStreamBase),
679 "::",
680 stringify!(mInputPreset)
681 )
682 );
683 assert_eq!(
684 unsafe { &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mSessionId as *const _ as usize },
685 76usize,
686 concat!(
687 "Offset of field: ",
688 stringify!(oboe_AudioStreamBase),
689 "::",
690 stringify!(mSessionId)
691 )
692 );
693 assert_eq!(
694 unsafe {
695 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mPackageName as *const _ as usize
696 },
697 80usize,
698 concat!(
699 "Offset of field: ",
700 stringify!(oboe_AudioStreamBase),
701 "::",
702 stringify!(mPackageName)
703 )
704 );
705 assert_eq!(
706 unsafe {
707 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mAttributionTag as *const _ as usize
708 },
709 104usize,
710 concat!(
711 "Offset of field: ",
712 stringify!(oboe_AudioStreamBase),
713 "::",
714 stringify!(mAttributionTag)
715 )
716 );
717 assert_eq!(
718 unsafe {
719 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mChannelConversionAllowed as *const _
720 as usize
721 },
722 128usize,
723 concat!(
724 "Offset of field: ",
725 stringify!(oboe_AudioStreamBase),
726 "::",
727 stringify!(mChannelConversionAllowed)
728 )
729 );
730 assert_eq!(
731 unsafe {
732 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mFormatConversionAllowed as *const _
733 as usize
734 },
735 129usize,
736 concat!(
737 "Offset of field: ",
738 stringify!(oboe_AudioStreamBase),
739 "::",
740 stringify!(mFormatConversionAllowed)
741 )
742 );
743 assert_eq!(
744 unsafe {
745 &(*(::std::ptr::null::<oboe_AudioStreamBase>())).mSampleRateConversionQuality
746 as *const _ as usize
747 },
748 132usize,
749 concat!(
750 "Offset of field: ",
751 stringify!(oboe_AudioStreamBase),
752 "::",
753 stringify!(mSampleRateConversionQuality)
754 )
755 );
756 }
757 #[doc = " Factory class for an audio Stream."]
758 #[repr(C)]
759 #[repr(align(8))]
760 #[derive(Debug, Copy, Clone)]
761 pub struct oboe_AudioStreamBuilder {
762 pub _bindgen_opaque_blob: [u64; 18usize],
763 }
764 #[test]
bindgen_test_layout_oboe_AudioStreamBuilder()765 fn bindgen_test_layout_oboe_AudioStreamBuilder() {
766 assert_eq!(
767 ::std::mem::size_of::<oboe_AudioStreamBuilder>(),
768 144usize,
769 concat!("Size of: ", stringify!(oboe_AudioStreamBuilder))
770 );
771 assert_eq!(
772 ::std::mem::align_of::<oboe_AudioStreamBuilder>(),
773 8usize,
774 concat!("Alignment of ", stringify!(oboe_AudioStreamBuilder))
775 );
776 }
777 extern "C" {
778 #[doc = " Is the AAudio API supported on this device?"]
779 #[doc = ""]
780 #[doc = " AAudio was introduced in the Oreo 8.0 release."]
781 #[doc = ""]
782 #[doc = " @return true if supported"]
783 #[link_name = "\u{1}_ZN4oboe18AudioStreamBuilder17isAAudioSupportedEv"]
oboe_AudioStreamBuilder_isAAudioSupported() -> bool784 pub fn oboe_AudioStreamBuilder_isAAudioSupported() -> bool;
785 }
786 extern "C" {
787 #[doc = " Is the AAudio API recommended this device?"]
788 #[doc = ""]
789 #[doc = " AAudio may be supported but not recommended because of version specific issues."]
790 #[doc = " AAudio is not recommended for Android 8.0 or earlier versions."]
791 #[doc = ""]
792 #[doc = " @return true if recommended"]
793 #[link_name = "\u{1}_ZN4oboe18AudioStreamBuilder19isAAudioRecommendedEv"]
oboe_AudioStreamBuilder_isAAudioRecommended() -> bool794 pub fn oboe_AudioStreamBuilder_isAAudioRecommended() -> bool;
795 }
796 extern "C" {
797 #[doc = " Create and open a stream object based on the current settings."]
798 #[doc = ""]
799 #[doc = " The caller owns the pointer to the AudioStream object"]
800 #[doc = " and must delete it when finished."]
801 #[doc = ""]
802 #[doc = " @deprecated Use openStream(std::shared_ptr<oboe::AudioStream> &stream) instead."]
803 #[doc = " @param stream pointer to a variable to receive the stream address"]
804 #[doc = " @return OBOE_OK if successful or a negative error code"]
805 #[link_name = "\u{1}_ZN4oboe18AudioStreamBuilder10openStreamEPPNS_11AudioStreamE"]
oboe_AudioStreamBuilder_openStream( this: *mut oboe_AudioStreamBuilder, stream: *mut *mut oboe_AudioStream, ) -> oboe_Result806 pub fn oboe_AudioStreamBuilder_openStream(
807 this: *mut oboe_AudioStreamBuilder,
808 stream: *mut *mut oboe_AudioStream,
809 ) -> oboe_Result;
810 }
811 impl oboe_AudioStreamBuilder {
812 #[inline]
isAAudioSupported() -> bool813 pub unsafe fn isAAudioSupported() -> bool {
814 oboe_AudioStreamBuilder_isAAudioSupported()
815 }
816 #[inline]
isAAudioRecommended() -> bool817 pub unsafe fn isAAudioRecommended() -> bool {
818 oboe_AudioStreamBuilder_isAAudioRecommended()
819 }
820 #[inline]
openStream(&mut self, stream: *mut *mut oboe_AudioStream) -> oboe_Result821 pub unsafe fn openStream(&mut self, stream: *mut *mut oboe_AudioStream) -> oboe_Result {
822 oboe_AudioStreamBuilder_openStream(self, stream)
823 }
824 }
825 #[doc = " Base class for Oboe C++ audio stream."]
826 #[repr(C)]
827 #[repr(align(8))]
828 #[derive(Debug, Copy, Clone)]
829 pub struct oboe_AudioStream {
830 pub _bindgen_opaque_blob: [u64; 28usize],
831 }
832 #[test]
bindgen_test_layout_oboe_AudioStream()833 fn bindgen_test_layout_oboe_AudioStream() {
834 assert_eq!(
835 ::std::mem::size_of::<oboe_AudioStream>(),
836 224usize,
837 concat!("Size of: ", stringify!(oboe_AudioStream))
838 );
839 assert_eq!(
840 ::std::mem::align_of::<oboe_AudioStream>(),
841 8usize,
842 concat!("Alignment of ", stringify!(oboe_AudioStream))
843 );
844 }
845 extern "C" {
846 #[doc = " Get the number of bytes per sample. This is calculated using the sample format. For example,"]
847 #[doc = " a stream using 16-bit integer samples will have 2 bytes per sample."]
848 #[doc = ""]
849 #[doc = " @return the number of bytes per sample."]
850 #[link_name = "\u{1}_ZNK4oboe11AudioStream17getBytesPerSampleEv"]
oboe_AudioStream_getBytesPerSample(this: *const oboe_AudioStream) -> i32851 pub fn oboe_AudioStream_getBytesPerSample(this: *const oboe_AudioStream) -> i32;
852 }
853 extern "C" {
854 #[doc = " @return number of frames of data currently in the buffer"]
855 #[link_name = "\u{1}_ZN4oboe11AudioStream18getAvailableFramesEv"]
oboe_AudioStream_getAvailableFrames( this: *mut oboe_AudioStream, ) -> oboe_ResultWithValue<i32>856 pub fn oboe_AudioStream_getAvailableFrames(
857 this: *mut oboe_AudioStream,
858 ) -> oboe_ResultWithValue<i32>;
859 }
860 extern "C" {
861 #[doc = " Wait until the stream has a minimum amount of data available in its buffer."]
862 #[doc = " This can be used with an EXCLUSIVE MMAP input stream to avoid reading data too close to"]
863 #[doc = " the DSP write position, which may cause glitches."]
864 #[doc = ""]
865 #[doc = " @param numFrames minimum frames available"]
866 #[doc = " @param timeoutNanoseconds"]
867 #[doc = " @return number of frames available, ErrorTimeout"]
868 #[link_name = "\u{1}_ZN4oboe11AudioStream22waitForAvailableFramesEil"]
oboe_AudioStream_waitForAvailableFrames( this: *mut oboe_AudioStream, numFrames: i32, timeoutNanoseconds: i64, ) -> oboe_ResultWithValue<i32>869 pub fn oboe_AudioStream_waitForAvailableFrames(
870 this: *mut oboe_AudioStream,
871 numFrames: i32,
872 timeoutNanoseconds: i64,
873 ) -> oboe_ResultWithValue<i32>;
874 }
875 extern "C" {
876 #[doc = " Override this to provide your own behaviour for the audio callback"]
877 #[doc = ""]
878 #[doc = " @param audioData container array which audio frames will be written into or read from"]
879 #[doc = " @param numFrames number of frames which were read/written"]
880 #[doc = " @return the result of the callback: stop or continue"]
881 #[doc = ""]
882 #[link_name = "\u{1}_ZN4oboe11AudioStream16fireDataCallbackEPvi"]
oboe_AudioStream_fireDataCallback( this: *mut oboe_AudioStream, audioData: *mut ::std::os::raw::c_void, numFrames: ::std::os::raw::c_int, ) -> oboe_DataCallbackResult883 pub fn oboe_AudioStream_fireDataCallback(
884 this: *mut oboe_AudioStream,
885 audioData: *mut ::std::os::raw::c_void,
886 numFrames: ::std::os::raw::c_int,
887 ) -> oboe_DataCallbackResult;
888 }
889 extern "C" {
890 #[doc = " Construct an `AudioStream` using the given `AudioStreamBuilder`"]
891 #[doc = ""]
892 #[doc = " @param builder containing all the stream's attributes"]
893 #[link_name = "\u{1}_ZN4oboe11AudioStreamC2ERKNS_18AudioStreamBuilderE"]
oboe_AudioStream_AudioStream( this: *mut oboe_AudioStream, builder: *const oboe_AudioStreamBuilder, )894 pub fn oboe_AudioStream_AudioStream(
895 this: *mut oboe_AudioStream,
896 builder: *const oboe_AudioStreamBuilder,
897 );
898 }
899 impl oboe_AudioStream {
900 #[inline]
getBytesPerSample(&self) -> i32901 pub unsafe fn getBytesPerSample(&self) -> i32 {
902 oboe_AudioStream_getBytesPerSample(self)
903 }
904 #[inline]
getAvailableFrames(&mut self) -> oboe_ResultWithValue<i32>905 pub unsafe fn getAvailableFrames(&mut self) -> oboe_ResultWithValue<i32> {
906 oboe_AudioStream_getAvailableFrames(self)
907 }
908 #[inline]
waitForAvailableFrames( &mut self, numFrames: i32, timeoutNanoseconds: i64, ) -> oboe_ResultWithValue<i32>909 pub unsafe fn waitForAvailableFrames(
910 &mut self,
911 numFrames: i32,
912 timeoutNanoseconds: i64,
913 ) -> oboe_ResultWithValue<i32> {
914 oboe_AudioStream_waitForAvailableFrames(self, numFrames, timeoutNanoseconds)
915 }
916 #[inline]
fireDataCallback( &mut self, audioData: *mut ::std::os::raw::c_void, numFrames: ::std::os::raw::c_int, ) -> oboe_DataCallbackResult917 pub unsafe fn fireDataCallback(
918 &mut self,
919 audioData: *mut ::std::os::raw::c_void,
920 numFrames: ::std::os::raw::c_int,
921 ) -> oboe_DataCallbackResult {
922 oboe_AudioStream_fireDataCallback(self, audioData, numFrames)
923 }
924 #[inline]
new(builder: *const oboe_AudioStreamBuilder) -> Self925 pub unsafe fn new(builder: *const oboe_AudioStreamBuilder) -> Self {
926 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
927 oboe_AudioStream_AudioStream(__bindgen_tmp.as_mut_ptr(), builder);
928 __bindgen_tmp.assume_init()
929 }
930 }
931 extern "C" {
932 #[doc = " Close the stream and deallocate any resources from the open() call."]
933 #[link_name = "\u{1}_ZN4oboe11AudioStream5closeEv"]
oboe_AudioStream_close(this: *mut ::std::os::raw::c_void) -> oboe_Result934 pub fn oboe_AudioStream_close(this: *mut ::std::os::raw::c_void) -> oboe_Result;
935 }
936 extern "C" {
937 #[doc = " Start the stream. This will block until the stream has been started, an error occurs"]
938 #[doc = " or `timeoutNanoseconds` has been reached."]
939 #[link_name = "\u{1}_ZN4oboe11AudioStream5startEl"]
oboe_AudioStream_start( this: *mut ::std::os::raw::c_void, timeoutNanoseconds: i64, ) -> oboe_Result940 pub fn oboe_AudioStream_start(
941 this: *mut ::std::os::raw::c_void,
942 timeoutNanoseconds: i64,
943 ) -> oboe_Result;
944 }
945 extern "C" {
946 #[doc = " Pause the stream. This will block until the stream has been paused, an error occurs"]
947 #[doc = " or `timeoutNanoseconds` has been reached."]
948 #[link_name = "\u{1}_ZN4oboe11AudioStream5pauseEl"]
oboe_AudioStream_pause( this: *mut ::std::os::raw::c_void, timeoutNanoseconds: i64, ) -> oboe_Result949 pub fn oboe_AudioStream_pause(
950 this: *mut ::std::os::raw::c_void,
951 timeoutNanoseconds: i64,
952 ) -> oboe_Result;
953 }
954 extern "C" {
955 #[doc = " Flush the stream. This will block until the stream has been flushed, an error occurs"]
956 #[doc = " or `timeoutNanoseconds` has been reached."]
957 #[link_name = "\u{1}_ZN4oboe11AudioStream5flushEl"]
oboe_AudioStream_flush( this: *mut ::std::os::raw::c_void, timeoutNanoseconds: i64, ) -> oboe_Result958 pub fn oboe_AudioStream_flush(
959 this: *mut ::std::os::raw::c_void,
960 timeoutNanoseconds: i64,
961 ) -> oboe_Result;
962 }
963 extern "C" {
964 #[doc = " Stop the stream. This will block until the stream has been stopped, an error occurs"]
965 #[doc = " or `timeoutNanoseconds` has been reached."]
966 #[link_name = "\u{1}_ZN4oboe11AudioStream4stopEl"]
oboe_AudioStream_stop( this: *mut ::std::os::raw::c_void, timeoutNanoseconds: i64, ) -> oboe_Result967 pub fn oboe_AudioStream_stop(
968 this: *mut ::std::os::raw::c_void,
969 timeoutNanoseconds: i64,
970 ) -> oboe_Result;
971 }
972 extern "C" {
973 #[doc = " The number of audio frames written into the stream."]
974 #[doc = " This monotonic counter will never get reset."]
975 #[doc = ""]
976 #[doc = " @return the number of frames written so far"]
977 #[link_name = "\u{1}_ZN4oboe11AudioStream16getFramesWrittenEv"]
oboe_AudioStream_getFramesWritten(this: *mut ::std::os::raw::c_void) -> i64978 pub fn oboe_AudioStream_getFramesWritten(this: *mut ::std::os::raw::c_void) -> i64;
979 }
980 extern "C" {
981 #[doc = " The number of audio frames read from the stream."]
982 #[doc = " This monotonic counter will never get reset."]
983 #[doc = ""]
984 #[doc = " @return the number of frames read so far"]
985 #[link_name = "\u{1}_ZN4oboe11AudioStream13getFramesReadEv"]
oboe_AudioStream_getFramesRead(this: *mut ::std::os::raw::c_void) -> i64986 pub fn oboe_AudioStream_getFramesRead(this: *mut ::std::os::raw::c_void) -> i64;
987 }
988 extern "C" {
989 #[doc = " Get the estimated time that the frame at `framePosition` entered or left the audio processing"]
990 #[doc = " pipeline."]
991 #[doc = ""]
992 #[doc = " This can be used to coordinate events and interactions with the external environment, and to"]
993 #[doc = " estimate the latency of an audio stream. An example of usage can be found in the hello-oboe"]
994 #[doc = " sample (search for \"calculateCurrentOutputLatencyMillis\")."]
995 #[doc = ""]
996 #[doc = " The time is based on the implementation's best effort, using whatever knowledge is available"]
997 #[doc = " to the system, but cannot account for any delay unknown to the implementation."]
998 #[doc = ""]
999 #[doc = " @param clockId the type of clock to use e.g. CLOCK_MONOTONIC"]
1000 #[doc = " @return a FrameTimestamp containing the position and time at which a particular audio frame"]
1001 #[doc = " entered or left the audio processing pipeline, or an error if the operation failed."]
1002 #[link_name = "\u{1}_ZN4oboe11AudioStream12getTimestampEi"]
oboe_AudioStream_getTimestamp( this: *mut ::std::os::raw::c_void, arg1: clockid_t, ) -> oboe_ResultWithValue<oboe_FrameTimestamp>1003 pub fn oboe_AudioStream_getTimestamp(
1004 this: *mut ::std::os::raw::c_void,
1005 arg1: clockid_t,
1006 ) -> oboe_ResultWithValue<oboe_FrameTimestamp>;
1007 }
1008 extern "C" {
1009 #[doc = " Wait for a transition from one state to another."]
1010 #[doc = " @return OK if the endingState was observed, or ErrorUnexpectedState"]
1011 #[doc = " if any state that was not the startingState or endingState was observed"]
1012 #[doc = " or ErrorTimeout."]
1013 #[link_name = "\u{1}_ZN4oboe11AudioStream22waitForStateTransitionENS_11StreamStateES1_l"]
oboe_AudioStream_waitForStateTransition( this: *mut ::std::os::raw::c_void, startingState: oboe_StreamState, endingState: oboe_StreamState, timeoutNanoseconds: i64, ) -> oboe_Result1014 pub fn oboe_AudioStream_waitForStateTransition(
1015 this: *mut ::std::os::raw::c_void,
1016 startingState: oboe_StreamState,
1017 endingState: oboe_StreamState,
1018 timeoutNanoseconds: i64,
1019 ) -> oboe_Result;
1020 }
1021 #[doc = " This struct is a stateless functor which closes an AudioStream prior to its deletion."]
1022 #[doc = " This means it can be used to safely delete a smart pointer referring to an open stream."]
1023 #[repr(C)]
1024 #[derive(Debug, Copy, Clone)]
1025 pub struct oboe_StreamDeleterFunctor {
1026 pub _address: u8,
1027 }
1028 #[test]
bindgen_test_layout_oboe_StreamDeleterFunctor()1029 fn bindgen_test_layout_oboe_StreamDeleterFunctor() {
1030 assert_eq!(
1031 ::std::mem::size_of::<oboe_StreamDeleterFunctor>(),
1032 1usize,
1033 concat!("Size of: ", stringify!(oboe_StreamDeleterFunctor))
1034 );
1035 assert_eq!(
1036 ::std::mem::align_of::<oboe_StreamDeleterFunctor>(),
1037 1usize,
1038 concat!("Alignment of ", stringify!(oboe_StreamDeleterFunctor))
1039 );
1040 }
1041 #[doc = " LatencyTuner can be used to dynamically tune the latency of an output stream."]
1042 #[doc = " It adjusts the stream's bufferSize by monitoring the number of underruns."]
1043 #[doc = ""]
1044 #[doc = " This only affects the latency associated with the first level of buffering that is closest"]
1045 #[doc = " to the application. It does not affect low latency in the HAL, or touch latency in the UI."]
1046 #[doc = ""]
1047 #[doc = " Call tune() right before returning from your data callback function if using callbacks."]
1048 #[doc = " Call tune() right before calling write() if using blocking writes."]
1049 #[doc = ""]
1050 #[doc = " If you want to see the ongoing results of this tuning process then call"]
1051 #[doc = " stream->getBufferSize() periodically."]
1052 #[doc = ""]
1053 #[repr(C)]
1054 #[repr(align(8))]
1055 #[derive(Debug, Copy, Clone)]
1056 pub struct oboe_LatencyTuner {
1057 pub _bindgen_opaque_blob: [u64; 5usize],
1058 }
1059 pub const oboe_LatencyTuner_State_Idle: oboe_LatencyTuner_State = 0;
1060 pub const oboe_LatencyTuner_State_Active: oboe_LatencyTuner_State = 1;
1061 pub const oboe_LatencyTuner_State_AtMax: oboe_LatencyTuner_State = 2;
1062 pub const oboe_LatencyTuner_State_Unsupported: oboe_LatencyTuner_State = 3;
1063 pub type oboe_LatencyTuner_State = ::std::os::raw::c_int;
1064 #[test]
bindgen_test_layout_oboe_LatencyTuner()1065 fn bindgen_test_layout_oboe_LatencyTuner() {
1066 assert_eq!(
1067 ::std::mem::size_of::<oboe_LatencyTuner>(),
1068 40usize,
1069 concat!("Size of: ", stringify!(oboe_LatencyTuner))
1070 );
1071 assert_eq!(
1072 ::std::mem::align_of::<oboe_LatencyTuner>(),
1073 8usize,
1074 concat!("Alignment of ", stringify!(oboe_LatencyTuner))
1075 );
1076 }
1077 extern "C" {
1078 #[doc = " Adjust the bufferSizeInFrames to optimize latency."]
1079 #[doc = " It will start with a low latency and then raise it if an underrun occurs."]
1080 #[doc = ""]
1081 #[doc = " Latency tuning is only supported for AAudio."]
1082 #[doc = ""]
1083 #[doc = " @return OK or negative error, ErrorUnimplemented for OpenSL ES"]
1084 #[link_name = "\u{1}_ZN4oboe12LatencyTuner4tuneEv"]
oboe_LatencyTuner_tune(this: *mut oboe_LatencyTuner) -> oboe_Result1085 pub fn oboe_LatencyTuner_tune(this: *mut oboe_LatencyTuner) -> oboe_Result;
1086 }
1087 extern "C" {
1088 #[doc = " This may be called from another thread. Then tune() will call reset(),"]
1089 #[doc = " which will lower the latency to the minimum and then allow it to rise back up"]
1090 #[doc = " if there are glitches."]
1091 #[doc = ""]
1092 #[doc = " This is typically called in response to a user decision to minimize latency. In other words,"]
1093 #[doc = " call this from a button handler."]
1094 #[link_name = "\u{1}_ZN4oboe12LatencyTuner12requestResetEv"]
oboe_LatencyTuner_requestReset(this: *mut oboe_LatencyTuner)1095 pub fn oboe_LatencyTuner_requestReset(this: *mut oboe_LatencyTuner);
1096 }
1097 extern "C" {
1098 #[doc = " @return true if the audio stream's buffer size is at the maximum value. If no maximum value"]
1099 #[doc = " was specified when constructing the LatencyTuner then the value of"]
1100 #[doc = " stream->getBufferCapacityInFrames is used"]
1101 #[link_name = "\u{1}_ZN4oboe12LatencyTuner21isAtMaximumBufferSizeEv"]
oboe_LatencyTuner_isAtMaximumBufferSize(this: *mut oboe_LatencyTuner) -> bool1102 pub fn oboe_LatencyTuner_isAtMaximumBufferSize(this: *mut oboe_LatencyTuner) -> bool;
1103 }
1104 extern "C" {
1105 #[doc = " Construct a new LatencyTuner object which will act on the given audio stream"]
1106 #[doc = ""]
1107 #[doc = " @param stream the stream who's latency will be tuned"]
1108 #[link_name = "\u{1}_ZN4oboe12LatencyTunerC1ERNS_11AudioStreamE"]
oboe_LatencyTuner_LatencyTuner( this: *mut oboe_LatencyTuner, stream: *mut oboe_AudioStream, )1109 pub fn oboe_LatencyTuner_LatencyTuner(
1110 this: *mut oboe_LatencyTuner,
1111 stream: *mut oboe_AudioStream,
1112 );
1113 }
1114 extern "C" {
1115 #[doc = " Construct a new LatencyTuner object which will act on the given audio stream."]
1116 #[doc = ""]
1117 #[doc = " @param stream the stream who's latency will be tuned"]
1118 #[doc = " @param the maximum buffer size which the tune() operation will set the buffer size to"]
1119 #[link_name = "\u{1}_ZN4oboe12LatencyTunerC1ERNS_11AudioStreamEi"]
oboe_LatencyTuner_LatencyTuner1( this: *mut oboe_LatencyTuner, stream: *mut oboe_AudioStream, maximumBufferSize: i32, )1120 pub fn oboe_LatencyTuner_LatencyTuner1(
1121 this: *mut oboe_LatencyTuner,
1122 stream: *mut oboe_AudioStream,
1123 maximumBufferSize: i32,
1124 );
1125 }
1126 impl oboe_LatencyTuner {
1127 #[inline]
tune(&mut self) -> oboe_Result1128 pub unsafe fn tune(&mut self) -> oboe_Result {
1129 oboe_LatencyTuner_tune(self)
1130 }
1131 #[inline]
requestReset(&mut self)1132 pub unsafe fn requestReset(&mut self) {
1133 oboe_LatencyTuner_requestReset(self)
1134 }
1135 #[inline]
isAtMaximumBufferSize(&mut self) -> bool1136 pub unsafe fn isAtMaximumBufferSize(&mut self) -> bool {
1137 oboe_LatencyTuner_isAtMaximumBufferSize(self)
1138 }
1139 #[inline]
new(stream: *mut oboe_AudioStream) -> Self1140 pub unsafe fn new(stream: *mut oboe_AudioStream) -> Self {
1141 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1142 oboe_LatencyTuner_LatencyTuner(__bindgen_tmp.as_mut_ptr(), stream);
1143 __bindgen_tmp.assume_init()
1144 }
1145 #[inline]
new1(stream: *mut oboe_AudioStream, maximumBufferSize: i32) -> Self1146 pub unsafe fn new1(stream: *mut oboe_AudioStream, maximumBufferSize: i32) -> Self {
1147 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1148 oboe_LatencyTuner_LatencyTuner1(__bindgen_tmp.as_mut_ptr(), stream, maximumBufferSize);
1149 __bindgen_tmp.assume_init()
1150 }
1151 }
1152 pub const oboe_LatencyTuner_kIdleCount: i32 = 8;
1153 pub const oboe_LatencyTuner_kDefaultNumBursts: i32 = 2;
1154 extern "C" {
1155 #[doc = " Return the version of the SDK that is currently running."]
1156 #[doc = ""]
1157 #[doc = " For example, on Android, this would return 27 for Oreo 8.1."]
1158 #[doc = " If the version number cannot be determined then this will return -1."]
1159 #[doc = ""]
1160 #[doc = " @return version number or -1"]
1161 #[link_name = "\u{1}_ZN4oboe13getSdkVersionEv"]
oboe_getSdkVersion() -> ::std::os::raw::c_int1162 pub fn oboe_getSdkVersion() -> ::std::os::raw::c_int;
1163 }
1164 #[doc = " Oboe versioning object"]
1165 #[repr(C)]
1166 #[derive(Debug, Copy, Clone)]
1167 pub struct oboe_Version {
1168 pub _address: u8,
1169 }
1170 #[doc = " This is incremented when we make breaking API changes. Based loosely on https://semver.org/."]
1171 pub const oboe_Version_Major: u8 = 1;
1172 #[doc = " This is incremented when we add backwards compatible functionality. Or set to zero when MAJOR is"]
1173 #[doc = " incremented."]
1174 pub const oboe_Version_Minor: u8 = 6;
1175 #[doc = " This is incremented when we make backwards compatible bug fixes. Or set to zero when MINOR is"]
1176 #[doc = " incremented."]
1177 pub const oboe_Version_Patch: u16 = 1;
1178 #[doc = " Version string in the form MAJOR.MINOR.PATCH."]
1179 pub const oboe_Version_Text: &'static [u8; 6usize] = b"1.6.1\0";
1180 #[doc = " Integer representation of the current Oboe library version. This will always increase when the"]
1181 #[doc = " version number changes so can be compared using integer comparison."]
1182 pub const oboe_Version_Number: u32 = 17170433;
1183 #[test]
bindgen_test_layout_oboe_Version()1184 fn bindgen_test_layout_oboe_Version() {
1185 assert_eq!(
1186 ::std::mem::size_of::<oboe_Version>(),
1187 1usize,
1188 concat!("Size of: ", stringify!(oboe_Version))
1189 );
1190 assert_eq!(
1191 ::std::mem::align_of::<oboe_Version>(),
1192 1usize,
1193 concat!("Alignment of ", stringify!(oboe_Version))
1194 );
1195 }
1196 #[repr(C)]
1197 #[derive(Debug)]
1198 pub struct oboe_StabilizedCallback {
1199 pub _base: oboe_AudioStreamCallback,
1200 pub mCallback: *mut oboe_AudioStreamCallback,
1201 pub mFrameCount: i64,
1202 pub mEpochTimeNanos: i64,
1203 pub mOpsPerNano: f64,
1204 }
1205 #[test]
bindgen_test_layout_oboe_StabilizedCallback()1206 fn bindgen_test_layout_oboe_StabilizedCallback() {
1207 assert_eq!(
1208 ::std::mem::size_of::<oboe_StabilizedCallback>(),
1209 48usize,
1210 concat!("Size of: ", stringify!(oboe_StabilizedCallback))
1211 );
1212 assert_eq!(
1213 ::std::mem::align_of::<oboe_StabilizedCallback>(),
1214 8usize,
1215 concat!("Alignment of ", stringify!(oboe_StabilizedCallback))
1216 );
1217 assert_eq!(
1218 unsafe {
1219 &(*(::std::ptr::null::<oboe_StabilizedCallback>())).mCallback as *const _ as usize
1220 },
1221 16usize,
1222 concat!(
1223 "Offset of field: ",
1224 stringify!(oboe_StabilizedCallback),
1225 "::",
1226 stringify!(mCallback)
1227 )
1228 );
1229 assert_eq!(
1230 unsafe {
1231 &(*(::std::ptr::null::<oboe_StabilizedCallback>())).mFrameCount as *const _ as usize
1232 },
1233 24usize,
1234 concat!(
1235 "Offset of field: ",
1236 stringify!(oboe_StabilizedCallback),
1237 "::",
1238 stringify!(mFrameCount)
1239 )
1240 );
1241 assert_eq!(
1242 unsafe {
1243 &(*(::std::ptr::null::<oboe_StabilizedCallback>())).mEpochTimeNanos as *const _ as usize
1244 },
1245 32usize,
1246 concat!(
1247 "Offset of field: ",
1248 stringify!(oboe_StabilizedCallback),
1249 "::",
1250 stringify!(mEpochTimeNanos)
1251 )
1252 );
1253 assert_eq!(
1254 unsafe {
1255 &(*(::std::ptr::null::<oboe_StabilizedCallback>())).mOpsPerNano as *const _ as usize
1256 },
1257 40usize,
1258 concat!(
1259 "Offset of field: ",
1260 stringify!(oboe_StabilizedCallback),
1261 "::",
1262 stringify!(mOpsPerNano)
1263 )
1264 );
1265 }
1266 extern "C" {
1267 #[link_name = "\u{1}_ZN4oboe18StabilizedCallbackC1EPNS_19AudioStreamCallbackE"]
oboe_StabilizedCallback_StabilizedCallback( this: *mut oboe_StabilizedCallback, callback: *mut oboe_AudioStreamCallback, )1268 pub fn oboe_StabilizedCallback_StabilizedCallback(
1269 this: *mut oboe_StabilizedCallback,
1270 callback: *mut oboe_AudioStreamCallback,
1271 );
1272 }
1273 impl oboe_StabilizedCallback {
1274 #[inline]
new(callback: *mut oboe_AudioStreamCallback) -> Self1275 pub unsafe fn new(callback: *mut oboe_AudioStreamCallback) -> Self {
1276 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1277 oboe_StabilizedCallback_StabilizedCallback(__bindgen_tmp.as_mut_ptr(), callback);
1278 __bindgen_tmp.assume_init()
1279 }
1280 }
1281 extern "C" {
1282 #[link_name = "\u{1}_ZN4oboe18StabilizedCallback12onAudioReadyEPNS_11AudioStreamEPvi"]
oboe_StabilizedCallback_onAudioReady( this: *mut ::std::os::raw::c_void, oboeStream: *mut oboe_AudioStream, audioData: *mut ::std::os::raw::c_void, numFrames: i32, ) -> oboe_DataCallbackResult1283 pub fn oboe_StabilizedCallback_onAudioReady(
1284 this: *mut ::std::os::raw::c_void,
1285 oboeStream: *mut oboe_AudioStream,
1286 audioData: *mut ::std::os::raw::c_void,
1287 numFrames: i32,
1288 ) -> oboe_DataCallbackResult;
1289 }
1290 pub type oboe_AudioReadyHandler = ::std::option::Option<
1291 unsafe extern "C" fn(
1292 context: *mut ::std::os::raw::c_void,
1293 oboeStream: *mut oboe_AudioStream,
1294 audioData: *mut ::std::os::raw::c_void,
1295 numFrames: i32,
1296 ) -> oboe_DataCallbackResult,
1297 >;
1298 pub type oboe_ErrorCloseHandler = ::std::option::Option<
1299 unsafe extern "C" fn(
1300 context: *mut ::std::os::raw::c_void,
1301 oboeStream: *mut oboe_AudioStream,
1302 error: oboe_Result,
1303 ),
1304 >;
1305 #[repr(C)]
1306 #[derive(Debug)]
1307 pub struct oboe_AudioStreamCallbackWrapper {
1308 pub _base: oboe_AudioStreamCallback,
1309 pub _context: *mut ::std::os::raw::c_void,
1310 pub _audio_ready: oboe_AudioReadyHandler,
1311 pub _before_close: oboe_ErrorCloseHandler,
1312 pub _after_close: oboe_ErrorCloseHandler,
1313 }
1314 #[test]
bindgen_test_layout_oboe_AudioStreamCallbackWrapper()1315 fn bindgen_test_layout_oboe_AudioStreamCallbackWrapper() {
1316 assert_eq!(
1317 ::std::mem::size_of::<oboe_AudioStreamCallbackWrapper>(),
1318 48usize,
1319 concat!("Size of: ", stringify!(oboe_AudioStreamCallbackWrapper))
1320 );
1321 assert_eq!(
1322 ::std::mem::align_of::<oboe_AudioStreamCallbackWrapper>(),
1323 8usize,
1324 concat!("Alignment of ", stringify!(oboe_AudioStreamCallbackWrapper))
1325 );
1326 assert_eq!(
1327 unsafe {
1328 &(*(::std::ptr::null::<oboe_AudioStreamCallbackWrapper>()))._context as *const _
1329 as usize
1330 },
1331 16usize,
1332 concat!(
1333 "Offset of field: ",
1334 stringify!(oboe_AudioStreamCallbackWrapper),
1335 "::",
1336 stringify!(_context)
1337 )
1338 );
1339 assert_eq!(
1340 unsafe {
1341 &(*(::std::ptr::null::<oboe_AudioStreamCallbackWrapper>()))._audio_ready as *const _
1342 as usize
1343 },
1344 24usize,
1345 concat!(
1346 "Offset of field: ",
1347 stringify!(oboe_AudioStreamCallbackWrapper),
1348 "::",
1349 stringify!(_audio_ready)
1350 )
1351 );
1352 assert_eq!(
1353 unsafe {
1354 &(*(::std::ptr::null::<oboe_AudioStreamCallbackWrapper>()))._before_close as *const _
1355 as usize
1356 },
1357 32usize,
1358 concat!(
1359 "Offset of field: ",
1360 stringify!(oboe_AudioStreamCallbackWrapper),
1361 "::",
1362 stringify!(_before_close)
1363 )
1364 );
1365 assert_eq!(
1366 unsafe {
1367 &(*(::std::ptr::null::<oboe_AudioStreamCallbackWrapper>()))._after_close as *const _
1368 as usize
1369 },
1370 40usize,
1371 concat!(
1372 "Offset of field: ",
1373 stringify!(oboe_AudioStreamCallbackWrapper),
1374 "::",
1375 stringify!(_after_close)
1376 )
1377 );
1378 }
1379 extern "C" {
1380 #[link_name = "\u{1}_ZN4oboe26AudioStreamCallbackWrapper10setContextEPv"]
oboe_AudioStreamCallbackWrapper_setContext( this: *mut oboe_AudioStreamCallbackWrapper, context: *mut ::std::os::raw::c_void, )1381 pub fn oboe_AudioStreamCallbackWrapper_setContext(
1382 this: *mut oboe_AudioStreamCallbackWrapper,
1383 context: *mut ::std::os::raw::c_void,
1384 );
1385 }
1386 extern "C" {
1387 #[link_name = "\u{1}_ZN4oboe26AudioStreamCallbackWrapperC1EPFNS_18DataCallbackResultEPvPNS_11AudioStreamES2_iEPFvS2_S4_NS_6ResultEES9_"]
oboe_AudioStreamCallbackWrapper_AudioStreamCallbackWrapper( this: *mut oboe_AudioStreamCallbackWrapper, audio_ready: oboe_AudioReadyHandler, before_close: oboe_ErrorCloseHandler, after_close: oboe_ErrorCloseHandler, )1388 pub fn oboe_AudioStreamCallbackWrapper_AudioStreamCallbackWrapper(
1389 this: *mut oboe_AudioStreamCallbackWrapper,
1390 audio_ready: oboe_AudioReadyHandler,
1391 before_close: oboe_ErrorCloseHandler,
1392 after_close: oboe_ErrorCloseHandler,
1393 );
1394 }
1395 impl oboe_AudioStreamCallbackWrapper {
1396 #[inline]
setContext(&mut self, context: *mut ::std::os::raw::c_void)1397 pub unsafe fn setContext(&mut self, context: *mut ::std::os::raw::c_void) {
1398 oboe_AudioStreamCallbackWrapper_setContext(self, context)
1399 }
1400 #[inline]
new( audio_ready: oboe_AudioReadyHandler, before_close: oboe_ErrorCloseHandler, after_close: oboe_ErrorCloseHandler, ) -> Self1401 pub unsafe fn new(
1402 audio_ready: oboe_AudioReadyHandler,
1403 before_close: oboe_ErrorCloseHandler,
1404 after_close: oboe_ErrorCloseHandler,
1405 ) -> Self {
1406 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1407 oboe_AudioStreamCallbackWrapper_AudioStreamCallbackWrapper(
1408 __bindgen_tmp.as_mut_ptr(),
1409 audio_ready,
1410 before_close,
1411 after_close,
1412 );
1413 __bindgen_tmp.assume_init()
1414 }
1415 }
1416 extern "C" {
1417 #[link_name = "\u{1}_ZN4oboe26AudioStreamCallbackWrapper12onAudioReadyEPNS_11AudioStreamEPvi"]
oboe_AudioStreamCallbackWrapper_onAudioReady( this: *mut ::std::os::raw::c_void, oboeStream: *mut oboe_AudioStream, audioData: *mut ::std::os::raw::c_void, numFrames: i32, ) -> oboe_DataCallbackResult1418 pub fn oboe_AudioStreamCallbackWrapper_onAudioReady(
1419 this: *mut ::std::os::raw::c_void,
1420 oboeStream: *mut oboe_AudioStream,
1421 audioData: *mut ::std::os::raw::c_void,
1422 numFrames: i32,
1423 ) -> oboe_DataCallbackResult;
1424 }
1425 extern "C" {
1426 #[link_name = "\u{1}_ZThn8_N4oboe26AudioStreamCallbackWrapper18onErrorBeforeCloseEPNS_11AudioStreamENS_6ResultE"]
oboe_AudioStreamCallbackWrapper_onErrorBeforeClose( this: *mut ::std::os::raw::c_void, oboeStream: *mut oboe_AudioStream, error: oboe_Result, )1427 pub fn oboe_AudioStreamCallbackWrapper_onErrorBeforeClose(
1428 this: *mut ::std::os::raw::c_void,
1429 oboeStream: *mut oboe_AudioStream,
1430 error: oboe_Result,
1431 );
1432 }
1433 extern "C" {
1434 #[link_name = "\u{1}_ZThn8_N4oboe26AudioStreamCallbackWrapper17onErrorAfterCloseEPNS_11AudioStreamENS_6ResultE"]
oboe_AudioStreamCallbackWrapper_onErrorAfterClose( this: *mut ::std::os::raw::c_void, oboeStream: *mut oboe_AudioStream, error: oboe_Result, )1435 pub fn oboe_AudioStreamCallbackWrapper_onErrorAfterClose(
1436 this: *mut ::std::os::raw::c_void,
1437 oboeStream: *mut oboe_AudioStream,
1438 error: oboe_Result,
1439 );
1440 }
1441 extern "C" {
1442 #[link_name = "\u{1}_ZN4oboe30AudioStreamCallbackWrapper_newEPFNS_18DataCallbackResultEPvPNS_11AudioStreamES1_iEPFvS1_S3_NS_6ResultEES8_"]
oboe_AudioStreamCallbackWrapper_new( audio_ready: oboe_AudioReadyHandler, before_close: oboe_ErrorCloseHandler, after_close: oboe_ErrorCloseHandler, ) -> *mut oboe_AudioStreamCallbackWrapper1443 pub fn oboe_AudioStreamCallbackWrapper_new(
1444 audio_ready: oboe_AudioReadyHandler,
1445 before_close: oboe_ErrorCloseHandler,
1446 after_close: oboe_ErrorCloseHandler,
1447 ) -> *mut oboe_AudioStreamCallbackWrapper;
1448 }
1449 extern "C" {
1450 #[link_name = "\u{1}_ZN4oboe33AudioStreamCallbackWrapper_deleteEPNS_26AudioStreamCallbackWrapperE"]
oboe_AudioStreamCallbackWrapper_delete(callback: *mut oboe_AudioStreamCallbackWrapper)1451 pub fn oboe_AudioStreamCallbackWrapper_delete(callback: *mut oboe_AudioStreamCallbackWrapper);
1452 }
1453 extern "C" {
1454 #[link_name = "\u{1}_ZN4oboe22AudioStreamBuilder_newEv"]
oboe_AudioStreamBuilder_new() -> *mut oboe_AudioStreamBuilder1455 pub fn oboe_AudioStreamBuilder_new() -> *mut oboe_AudioStreamBuilder;
1456 }
1457 extern "C" {
1458 #[link_name = "\u{1}_ZN4oboe25AudioStreamBuilder_deleteEPNS_18AudioStreamBuilderE"]
oboe_AudioStreamBuilder_delete(builder: *mut oboe_AudioStreamBuilder)1459 pub fn oboe_AudioStreamBuilder_delete(builder: *mut oboe_AudioStreamBuilder);
1460 }
1461 extern "C" {
1462 #[link_name = "\u{1}_ZN4oboe30AudioStreamBuilder_setCallbackEPNS_18AudioStreamBuilderEPNS_26AudioStreamCallbackWrapperE"]
oboe_AudioStreamBuilder_setCallback( builder: *mut oboe_AudioStreamBuilder, callback: *mut oboe_AudioStreamCallbackWrapper, )1463 pub fn oboe_AudioStreamBuilder_setCallback(
1464 builder: *mut oboe_AudioStreamBuilder,
1465 callback: *mut oboe_AudioStreamCallbackWrapper,
1466 );
1467 }
1468 extern "C" {
1469 #[link_name = "\u{1}_ZN4oboe30AudioStreamBuilder_getAudioApiEPKNS_18AudioStreamBuilderE"]
oboe_AudioStreamBuilder_getAudioApi( builder: *const oboe_AudioStreamBuilder, ) -> oboe_AudioApi1470 pub fn oboe_AudioStreamBuilder_getAudioApi(
1471 builder: *const oboe_AudioStreamBuilder,
1472 ) -> oboe_AudioApi;
1473 }
1474 extern "C" {
1475 #[link_name = "\u{1}_ZN4oboe30AudioStreamBuilder_setAudioApiEPNS_18AudioStreamBuilderENS_8AudioApiE"]
oboe_AudioStreamBuilder_setAudioApi( builder: *mut oboe_AudioStreamBuilder, api: oboe_AudioApi, )1476 pub fn oboe_AudioStreamBuilder_setAudioApi(
1477 builder: *mut oboe_AudioStreamBuilder,
1478 api: oboe_AudioApi,
1479 );
1480 }
1481 extern "C" {
1482 #[link_name = "\u{1}_ZN4oboe26AudioStreamBuilder_getBaseEPNS_18AudioStreamBuilderE"]
oboe_AudioStreamBuilder_getBase( builder: *mut oboe_AudioStreamBuilder, ) -> *mut oboe_AudioStreamBase1483 pub fn oboe_AudioStreamBuilder_getBase(
1484 builder: *mut oboe_AudioStreamBuilder,
1485 ) -> *mut oboe_AudioStreamBase;
1486 }
1487 extern "C" {
1488 #[link_name = "\u{1}_ZN4oboe18AudioStream_deleteEPNS_11AudioStreamE"]
oboe_AudioStream_delete(oboeStream: *mut oboe_AudioStream)1489 pub fn oboe_AudioStream_delete(oboeStream: *mut oboe_AudioStream);
1490 }
1491 extern "C" {
1492 #[link_name = "\u{1}_ZN4oboe16AudioStream_openEPNS_11AudioStreamE"]
oboe_AudioStream_open(oboeStream: *mut oboe_AudioStream) -> oboe_Result1493 pub fn oboe_AudioStream_open(oboeStream: *mut oboe_AudioStream) -> oboe_Result;
1494 }
1495 extern "C" {
1496 #[link_name = "\u{1}_ZN4oboe24AudioStream_requestStartEPNS_11AudioStreamE"]
oboe_AudioStream_requestStart(oboeStream: *mut oboe_AudioStream) -> oboe_Result1497 pub fn oboe_AudioStream_requestStart(oboeStream: *mut oboe_AudioStream) -> oboe_Result;
1498 }
1499 extern "C" {
1500 #[link_name = "\u{1}_ZN4oboe24AudioStream_requestPauseEPNS_11AudioStreamE"]
oboe_AudioStream_requestPause(oboeStream: *mut oboe_AudioStream) -> oboe_Result1501 pub fn oboe_AudioStream_requestPause(oboeStream: *mut oboe_AudioStream) -> oboe_Result;
1502 }
1503 extern "C" {
1504 #[link_name = "\u{1}_ZN4oboe24AudioStream_requestFlushEPNS_11AudioStreamE"]
oboe_AudioStream_requestFlush(oboeStream: *mut oboe_AudioStream) -> oboe_Result1505 pub fn oboe_AudioStream_requestFlush(oboeStream: *mut oboe_AudioStream) -> oboe_Result;
1506 }
1507 extern "C" {
1508 #[link_name = "\u{1}_ZN4oboe23AudioStream_requestStopEPNS_11AudioStreamE"]
oboe_AudioStream_requestStop(oboeStream: *mut oboe_AudioStream) -> oboe_Result1509 pub fn oboe_AudioStream_requestStop(oboeStream: *mut oboe_AudioStream) -> oboe_Result;
1510 }
1511 extern "C" {
1512 #[link_name = "\u{1}_ZN4oboe20AudioStream_getStateEPNS_11AudioStreamE"]
oboe_AudioStream_getState(oboeStream: *mut oboe_AudioStream) -> oboe_StreamState1513 pub fn oboe_AudioStream_getState(oboeStream: *mut oboe_AudioStream) -> oboe_StreamState;
1514 }
1515 extern "C" {
1516 #[link_name = "\u{1}_ZN4oboe30AudioStream_waitForStateChangeEPNS_11AudioStreamENS_11StreamStateEPS2_l"]
oboe_AudioStream_waitForStateChange( oboeStream: *mut oboe_AudioStream, inputState: oboe_StreamState, nextState: *mut oboe_StreamState, timeoutNanoseconds: i64, ) -> oboe_Result1517 pub fn oboe_AudioStream_waitForStateChange(
1518 oboeStream: *mut oboe_AudioStream,
1519 inputState: oboe_StreamState,
1520 nextState: *mut oboe_StreamState,
1521 timeoutNanoseconds: i64,
1522 ) -> oboe_Result;
1523 }
1524 extern "C" {
1525 #[link_name = "\u{1}_ZN4oboe33AudioStream_setBufferSizeInFramesEPNS_11AudioStreamEi"]
oboe_AudioStream_setBufferSizeInFrames( oboeStream: *mut oboe_AudioStream, requestedFrames: i32, ) -> oboe_ResultWithValue<i32>1526 pub fn oboe_AudioStream_setBufferSizeInFrames(
1527 oboeStream: *mut oboe_AudioStream,
1528 requestedFrames: i32,
1529 ) -> oboe_ResultWithValue<i32>;
1530 }
1531 extern "C" {
1532 #[link_name = "\u{1}_ZN4oboe24AudioStream_getXRunCountEPNS_11AudioStreamE"]
oboe_AudioStream_getXRunCount( oboeStream: *mut oboe_AudioStream, ) -> oboe_ResultWithValue<i32>1533 pub fn oboe_AudioStream_getXRunCount(
1534 oboeStream: *mut oboe_AudioStream,
1535 ) -> oboe_ResultWithValue<i32>;
1536 }
1537 extern "C" {
1538 #[link_name = "\u{1}_ZN4oboe32AudioStream_isXRunCountSupportedEPKNS_11AudioStreamE"]
oboe_AudioStream_isXRunCountSupported(oboeStream: *const oboe_AudioStream) -> bool1539 pub fn oboe_AudioStream_isXRunCountSupported(oboeStream: *const oboe_AudioStream) -> bool;
1540 }
1541 extern "C" {
1542 #[link_name = "\u{1}_ZN4oboe29AudioStream_getFramesPerBurstEPNS_11AudioStreamE"]
oboe_AudioStream_getFramesPerBurst(oboeStream: *mut oboe_AudioStream) -> i321543 pub fn oboe_AudioStream_getFramesPerBurst(oboeStream: *mut oboe_AudioStream) -> i32;
1544 }
1545 extern "C" {
1546 #[link_name = "\u{1}_ZN4oboe34AudioStream_calculateLatencyMillisEPNS_11AudioStreamE"]
oboe_AudioStream_calculateLatencyMillis( oboeStream: *mut oboe_AudioStream, ) -> oboe_ResultWithValue<f64>1547 pub fn oboe_AudioStream_calculateLatencyMillis(
1548 oboeStream: *mut oboe_AudioStream,
1549 ) -> oboe_ResultWithValue<f64>;
1550 }
1551 extern "C" {
1552 #[link_name = "\u{1}_ZN4oboe23AudioStream_getAudioApiEPKNS_11AudioStreamE"]
oboe_AudioStream_getAudioApi(oboeStream: *const oboe_AudioStream) -> oboe_AudioApi1553 pub fn oboe_AudioStream_getAudioApi(oboeStream: *const oboe_AudioStream) -> oboe_AudioApi;
1554 }
1555 extern "C" {
1556 #[link_name = "\u{1}_ZN4oboe16AudioStream_readEPNS_11AudioStreamEPvil"]
oboe_AudioStream_read( oboeStream: *mut oboe_AudioStream, buffer: *mut ::std::os::raw::c_void, numFrames: i32, timeoutNanoseconds: i64, ) -> oboe_ResultWithValue<i32>1557 pub fn oboe_AudioStream_read(
1558 oboeStream: *mut oboe_AudioStream,
1559 buffer: *mut ::std::os::raw::c_void,
1560 numFrames: i32,
1561 timeoutNanoseconds: i64,
1562 ) -> oboe_ResultWithValue<i32>;
1563 }
1564 extern "C" {
1565 #[link_name = "\u{1}_ZN4oboe17AudioStream_writeEPNS_11AudioStreamEPKvil"]
oboe_AudioStream_write( oboeStream: *mut oboe_AudioStream, buffer: *const ::std::os::raw::c_void, numFrames: i32, timeoutNanoseconds: i64, ) -> oboe_ResultWithValue<i32>1566 pub fn oboe_AudioStream_write(
1567 oboeStream: *mut oboe_AudioStream,
1568 buffer: *const ::std::os::raw::c_void,
1569 numFrames: i32,
1570 timeoutNanoseconds: i64,
1571 ) -> oboe_ResultWithValue<i32>;
1572 }
1573 extern "C" {
1574 #[link_name = "\u{1}_ZN4oboe19AudioStream_getBaseEPNS_11AudioStreamE"]
oboe_AudioStream_getBase(oboeStream: *mut oboe_AudioStream) -> *mut oboe_AudioStreamBase1575 pub fn oboe_AudioStream_getBase(oboeStream: *mut oboe_AudioStream)
1576 -> *mut oboe_AudioStreamBase;
1577 }
1578 pub type __kernel_clockid_t = ::std::os::raw::c_int;
1579 pub type __clockid_t = __kernel_clockid_t;
1580 pub type clockid_t = __clockid_t;
1581 #[test]
__bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation()1582 fn __bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation() {
1583 assert_eq!(
1584 ::std::mem::size_of::<oboe_ResultWithValue<i32>>(),
1585 8usize,
1586 concat!(
1587 "Size of template specialization: ",
1588 stringify!(oboe_ResultWithValue<i32>)
1589 )
1590 );
1591 assert_eq!(
1592 ::std::mem::align_of::<oboe_ResultWithValue<i32>>(),
1593 4usize,
1594 concat!(
1595 "Alignment of template specialization: ",
1596 stringify!(oboe_ResultWithValue<i32>)
1597 )
1598 );
1599 }
1600 #[test]
__bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation_1()1601 fn __bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation_1() {
1602 assert_eq!(
1603 ::std::mem::size_of::<oboe_ResultWithValue<i32>>(),
1604 8usize,
1605 concat!(
1606 "Size of template specialization: ",
1607 stringify!(oboe_ResultWithValue<i32>)
1608 )
1609 );
1610 assert_eq!(
1611 ::std::mem::align_of::<oboe_ResultWithValue<i32>>(),
1612 4usize,
1613 concat!(
1614 "Alignment of template specialization: ",
1615 stringify!(oboe_ResultWithValue<i32>)
1616 )
1617 );
1618 }
1619 #[test]
__bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation_2()1620 fn __bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation_2() {
1621 assert_eq!(
1622 ::std::mem::size_of::<oboe_ResultWithValue<i32>>(),
1623 8usize,
1624 concat!(
1625 "Size of template specialization: ",
1626 stringify!(oboe_ResultWithValue<i32>)
1627 )
1628 );
1629 assert_eq!(
1630 ::std::mem::align_of::<oboe_ResultWithValue<i32>>(),
1631 4usize,
1632 concat!(
1633 "Alignment of template specialization: ",
1634 stringify!(oboe_ResultWithValue<i32>)
1635 )
1636 );
1637 }
1638 #[test]
__bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation_3()1639 fn __bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation_3() {
1640 assert_eq!(
1641 ::std::mem::size_of::<oboe_ResultWithValue<i32>>(),
1642 8usize,
1643 concat!(
1644 "Size of template specialization: ",
1645 stringify!(oboe_ResultWithValue<i32>)
1646 )
1647 );
1648 assert_eq!(
1649 ::std::mem::align_of::<oboe_ResultWithValue<i32>>(),
1650 4usize,
1651 concat!(
1652 "Alignment of template specialization: ",
1653 stringify!(oboe_ResultWithValue<i32>)
1654 )
1655 );
1656 }
1657 #[test]
__bindgen_test_layout_oboe_ResultWithValue_open0_double_close0_instantiation()1658 fn __bindgen_test_layout_oboe_ResultWithValue_open0_double_close0_instantiation() {
1659 assert_eq!(
1660 ::std::mem::size_of::<oboe_ResultWithValue<f64>>(),
1661 16usize,
1662 concat!(
1663 "Size of template specialization: ",
1664 stringify!(oboe_ResultWithValue<f64>)
1665 )
1666 );
1667 assert_eq!(
1668 ::std::mem::align_of::<oboe_ResultWithValue<f64>>(),
1669 8usize,
1670 concat!(
1671 "Alignment of template specialization: ",
1672 stringify!(oboe_ResultWithValue<f64>)
1673 )
1674 );
1675 }
1676 #[test]
__bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation_4()1677 fn __bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation_4() {
1678 assert_eq!(
1679 ::std::mem::size_of::<oboe_ResultWithValue<i32>>(),
1680 8usize,
1681 concat!(
1682 "Size of template specialization: ",
1683 stringify!(oboe_ResultWithValue<i32>)
1684 )
1685 );
1686 assert_eq!(
1687 ::std::mem::align_of::<oboe_ResultWithValue<i32>>(),
1688 4usize,
1689 concat!(
1690 "Alignment of template specialization: ",
1691 stringify!(oboe_ResultWithValue<i32>)
1692 )
1693 );
1694 }
1695 #[test]
__bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation_5()1696 fn __bindgen_test_layout_oboe_ResultWithValue_open0_int32_t_close0_instantiation_5() {
1697 assert_eq!(
1698 ::std::mem::size_of::<oboe_ResultWithValue<i32>>(),
1699 8usize,
1700 concat!(
1701 "Size of template specialization: ",
1702 stringify!(oboe_ResultWithValue<i32>)
1703 )
1704 );
1705 assert_eq!(
1706 ::std::mem::align_of::<oboe_ResultWithValue<i32>>(),
1707 4usize,
1708 concat!(
1709 "Alignment of template specialization: ",
1710 stringify!(oboe_ResultWithValue<i32>)
1711 )
1712 );
1713 }
1714