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