From f4a3870c1d056a030f49e45e3f3316354bae7d0b Mon Sep 17 00:00:00 2001 From: katyo <238571+katyo@users.noreply.github.com> Date: Wed, 21 Feb 2024 08:02:15 +0000 Subject: [PATCH] Updated bindings --- sys/src/bindings_aarch64.rs | 228 ++++++++++++++++++++++++++++++++--- sys/src/bindings_armv7.rs | 229 ++++++++++++++++++++++++++++++++---- sys/src/bindings_i686.rs | 229 ++++++++++++++++++++++++++++++++---- sys/src/bindings_x86_64.rs | 228 ++++++++++++++++++++++++++++++++--- 4 files changed, 836 insertions(+), 78 deletions(-) diff --git a/sys/src/bindings_aarch64.rs b/sys/src/bindings_aarch64.rs index 7b96b9f..114f4e9 100644 --- a/sys/src/bindings_aarch64.rs +++ b/sys/src/bindings_aarch64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.63.0 */ +/* automatically generated by rust-bindgen 0.69.4 */ pub type std_string = [u64; 3usize]; pub const oboe_StreamState_Uninitialized: oboe_StreamState = 0; @@ -25,7 +25,7 @@ pub const oboe_Direction_Input: oboe_Direction = 1; pub type oboe_Direction = i32; #[doc = " Invalid format."] pub const oboe_AudioFormat_Invalid: oboe_AudioFormat = -1; -#[doc = " Unspecified format. Format will be decided by Oboe."] +#[doc = " Unspecified format. Format will be decided by Oboe.\n When calling getHardwareFormat(), this will be returned if\n the API is not supported."] pub const oboe_AudioFormat_Unspecified: oboe_AudioFormat = 0; #[doc = " Signed 16-bit integers."] pub const oboe_AudioFormat_I16: oboe_AudioFormat = 1; @@ -35,6 +35,8 @@ pub const oboe_AudioFormat_Float: oboe_AudioFormat = 2; pub const oboe_AudioFormat_I24: oboe_AudioFormat = 3; #[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)."] pub const oboe_AudioFormat_I32: oboe_AudioFormat = 4; +#[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)."] +pub const oboe_AudioFormat_IEC61937: oboe_AudioFormat = 5; #[doc = " The format of audio samples."] pub type oboe_AudioFormat = i32; pub const oboe_DataCallbackResult_Continue: oboe_DataCallbackResult = 0; @@ -199,33 +201,84 @@ pub const oboe_ChannelMask_BottomFrontRight: oboe_ChannelMask = 4194304; pub const oboe_ChannelMask_LowFrequency2: oboe_ChannelMask = 8388608; pub const oboe_ChannelMask_FrontWideLeft: oboe_ChannelMask = 16777216; pub const oboe_ChannelMask_FrontWideRight: oboe_ChannelMask = 33554432; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_Mono: oboe_ChannelMask = 1; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_Stereo: oboe_ChannelMask = 3; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM2Point1: oboe_ChannelMask = 11; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Tri: oboe_ChannelMask = 7; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_TriBack: oboe_ChannelMask = 259; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM3Point1: oboe_ChannelMask = 15; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM2Point0Point2: oboe_ChannelMask = 786435; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM2Point1Point2: oboe_ChannelMask = 786443; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM3Point0Point2: oboe_ChannelMask = 786439; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM3Point1Point2: oboe_ChannelMask = 786447; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Quad: oboe_ChannelMask = 51; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_QuadSide: oboe_ChannelMask = 1539; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Surround: oboe_ChannelMask = 263; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Penta: oboe_ChannelMask = 55; +#[doc = " Supported for Input and Output. aka 5Point1Back"] pub const oboe_ChannelMask_CM5Point1: oboe_ChannelMask = 63; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Side: oboe_ChannelMask = 1551; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM6Point1: oboe_ChannelMask = 319; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1: oboe_ChannelMask = 1599; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Point2: oboe_ChannelMask = 786495; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Point4: oboe_ChannelMask = 184383; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1Point2: oboe_ChannelMask = 788031; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1Point4: oboe_ChannelMask = 185919; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM9Point1Point4: oboe_ChannelMask = 50517567; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM9Point1Point6: oboe_ChannelMask = 51303999; +#[doc = " Supported for only Input"] pub const oboe_ChannelMask_FrontBack: oboe_ChannelMask = 260; -#[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."] +#[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."] pub type oboe_ChannelMask = u32; +#[doc = " Constant indicating that the spatialization behavior is not specified."] +pub const oboe_SpatializationBehavior_Unspecified: oboe_SpatializationBehavior = 0; +#[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."] +pub const oboe_SpatializationBehavior_Auto: oboe_SpatializationBehavior = 1; +#[doc = " Constant indicating the audio content associated with these attributes should never\n be spatialized."] +pub const oboe_SpatializationBehavior_Never: oboe_SpatializationBehavior = 2; +#[doc = " The spatialization behavior of the audio stream."] +pub type oboe_SpatializationBehavior = i32; +#[doc = " When not explicitly requested, set privacy sensitive mode according to input preset:\n communication and camcorder captures are considered privacy sensitive by default."] +pub const oboe_PrivacySensitiveMode_Unspecified: oboe_PrivacySensitiveMode = 0; +#[doc = " Privacy sensitive mode disabled."] +pub const oboe_PrivacySensitiveMode_Disabled: oboe_PrivacySensitiveMode = 1; +#[doc = " Privacy sensitive mode enabled."] +pub const oboe_PrivacySensitiveMode_Enabled: oboe_PrivacySensitiveMode = 2; +#[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)."] +pub type oboe_PrivacySensitiveMode = i32; +#[doc = " When not explicitly requested, set privacy sensitive mode according to the Usage.\n This should behave similarly to setting AllowedCapturePolicy::All."] +pub const oboe_AllowedCapturePolicy_Unspecified: oboe_AllowedCapturePolicy = 0; +#[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."] +pub const oboe_AllowedCapturePolicy_All: oboe_AllowedCapturePolicy = 1; +#[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."] +pub const oboe_AllowedCapturePolicy_System: oboe_AllowedCapturePolicy = 2; +#[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"] +pub const oboe_AllowedCapturePolicy_None: oboe_AllowedCapturePolicy = 3; +#[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."] +pub type oboe_AllowedCapturePolicy = i32; #[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
\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 
\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."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -414,10 +467,24 @@ pub struct oboe_AudioStreamBase { pub mInputPreset: oboe_InputPreset, #[doc = " Stream session ID allocation strategy. Only active on Android 28+"] pub mSessionId: oboe_SessionId, + #[doc = " Allowed Capture Policy. Only active on Android 29+"] + pub mAllowedCapturePolicy: oboe_AllowedCapturePolicy, + #[doc = " Privacy Sensitive Mode. Only active on Android 30+"] + pub mPrivacySensitiveMode: oboe_PrivacySensitiveMode, #[doc = " Control the name of the package creating the stream. Only active on Android 31+"] pub mPackageName: std_string, #[doc = " Control the attribution tag of the context creating the stream. Only active on Android 31+"] pub mAttributionTag: std_string, + #[doc = " Whether the content is already spatialized. Only used on Android 32+"] + pub mIsContentSpatialized: bool, + #[doc = " Spatialization Behavior. Only active on Android 32+"] + pub mSpatializationBehavior: oboe_SpatializationBehavior, + #[doc = " Hardware channel count. Only specified on Android 34+ AAudio streams"] + pub mHardwareChannelCount: i32, + #[doc = " Hardware sample rate. Only specified on Android 34+ AAudio streams"] + pub mHardwareSampleRate: i32, + #[doc = " Hardware format. Only specified on Android 34+ AAudio streams"] + pub mHardwareFormat: oboe_AudioFormat, pub mChannelConversionAllowed: bool, pub mFormatConversionAllowed: bool, pub mSampleRateConversionQuality: oboe_SampleRateConversionQuality, @@ -428,7 +495,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 176usize, + 208usize, concat!("Size of: ", stringify!(oboe_AudioStreamBase)) ); assert_eq!( @@ -627,8 +694,28 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mPackageName) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mAllowedCapturePolicy) as usize - ptr as usize }, + 116usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mAllowedCapturePolicy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mPrivacySensitiveMode) as usize - ptr as usize }, 120usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mPrivacySensitiveMode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mPackageName) as usize - ptr as usize }, + 128usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -638,7 +725,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mAttributionTag) as usize - ptr as usize }, - 144usize, + 152usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -646,9 +733,59 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { stringify!(mAttributionTag) ) ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mIsContentSpatialized) as usize - ptr as usize }, + 176usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mIsContentSpatialized) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mSpatializationBehavior) as usize - ptr as usize }, + 180usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mSpatializationBehavior) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareChannelCount) as usize - ptr as usize }, + 184usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareChannelCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareSampleRate) as usize - ptr as usize }, + 188usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareSampleRate) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareFormat) as usize - ptr as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareFormat) + ) + ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mChannelConversionAllowed) as usize - ptr as usize }, - 168usize, + 196usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -658,7 +795,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mFormatConversionAllowed) as usize - ptr as usize }, - 169usize, + 197usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -670,7 +807,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { unsafe { ::std::ptr::addr_of!((*ptr).mSampleRateConversionQuality) as usize - ptr as usize }, - 172usize, + 200usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -689,13 +826,13 @@ extern "C" { #[repr(align(8))] #[derive(Debug, Copy, Clone)] pub struct oboe_AudioStreamBuilder { - pub _bindgen_opaque_blob: [u64; 23usize], + pub _bindgen_opaque_blob: [u64; 26usize], } #[test] fn bindgen_test_layout_oboe_AudioStreamBuilder() { assert_eq!( ::std::mem::size_of::(), - 184usize, + 208usize, concat!("Size of: ", stringify!(oboe_AudioStreamBuilder)) ); assert_eq!( @@ -728,13 +865,13 @@ impl oboe_AudioStreamBuilder { #[repr(C)] #[repr(align(8))] pub struct oboe_AudioStream { - pub _bindgen_opaque_blob: [u64; 34usize], + pub _bindgen_opaque_blob: [u64; 38usize], } #[test] fn bindgen_test_layout_oboe_AudioStream() { assert_eq!( ::std::mem::size_of::(), - 272usize, + 304usize, concat!("Size of: ", stringify!(oboe_AudioStream)) ); assert_eq!( @@ -756,7 +893,7 @@ extern "C" { ) -> oboe_ResultWithValue; } extern "C" { - #[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 @param numFrames minimum frames available\n @param timeoutNanoseconds\n @return number of frames available, ErrorTimeout"] + #[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"] #[link_name = "\u{1}_ZN4oboe11AudioStream22waitForAvailableFramesEil"] pub fn oboe_AudioStream_waitForAvailableFrames( this: *mut oboe_AudioStream, @@ -870,7 +1007,7 @@ extern "C" { pub fn oboe_AudioStream_getFramesRead(this: *mut ::std::os::raw::c_void) -> i64; } extern "C" { - #[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/blob/main/docs/notes/rlsbuffer.md\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."] + #[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."] #[link_name = "\u{1}_ZN4oboe11AudioStream12getTimestampEi"] pub fn oboe_AudioStream_getTimestamp( this: *mut ::std::os::raw::c_void, @@ -1001,13 +1138,13 @@ pub struct oboe_Version { #[doc = " This is incremented when we make breaking API changes. Based loosely on https://semver.org/."] pub const oboe_Version_Major: u8 = 1; #[doc = " This is incremented when we add backwards compatible functionality. Or set to zero when MAJOR is\n incremented."] -pub const oboe_Version_Minor: u8 = 7; +pub const oboe_Version_Minor: u8 = 8; #[doc = " This is incremented when we make backwards compatible bug fixes. Or set to zero when MINOR is\n incremented."] -pub const oboe_Version_Patch: u16 = 0; +pub const oboe_Version_Patch: u16 = 1; #[doc = " Version string in the form MAJOR.MINOR.PATCH."] -pub const oboe_Version_Text: &[u8; 6usize] = b"1.7.0\0"; +pub const oboe_Version_Text: &[u8; 6] = b"1.8.1\0"; #[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."] -pub const oboe_Version_Number: u32 = 17235968; +pub const oboe_Version_Number: u32 = 17301505; #[test] fn bindgen_test_layout_oboe_Version() { assert_eq!( @@ -1141,6 +1278,9 @@ pub struct oboe_AudioStreamCallbackWrapper { } #[test] fn bindgen_test_layout_oboe_AudioStreamCallbackWrapper() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, @@ -1151,6 +1291,56 @@ fn bindgen_test_layout_oboe_AudioStreamCallbackWrapper() { 8usize, concat!("Alignment of ", stringify!(oboe_AudioStreamCallbackWrapper)) ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._context) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_context) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._drop_context) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_drop_context) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._audio_ready) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_audio_ready) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._before_close) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_before_close) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._after_close) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_after_close) + ) + ); } extern "C" { #[link_name = "\u{1}_ZN4oboe26AudioStreamCallbackWrapperC1EPvPFvS1_EPFNS_18DataCallbackResultES1_PNS_11AudioStreamES1_iEPFvS1_S6_NS_6ResultEESB_"] diff --git a/sys/src/bindings_armv7.rs b/sys/src/bindings_armv7.rs index 2c260c8..d30736f 100644 --- a/sys/src/bindings_armv7.rs +++ b/sys/src/bindings_armv7.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.63.0 */ +/* automatically generated by rust-bindgen 0.69.4 */ pub type std_string = [u32; 3usize]; pub const oboe_StreamState_Uninitialized: oboe_StreamState = 0; @@ -25,7 +25,7 @@ pub const oboe_Direction_Input: oboe_Direction = 1; pub type oboe_Direction = i32; #[doc = " Invalid format."] pub const oboe_AudioFormat_Invalid: oboe_AudioFormat = -1; -#[doc = " Unspecified format. Format will be decided by Oboe."] +#[doc = " Unspecified format. Format will be decided by Oboe.\n When calling getHardwareFormat(), this will be returned if\n the API is not supported."] pub const oboe_AudioFormat_Unspecified: oboe_AudioFormat = 0; #[doc = " Signed 16-bit integers."] pub const oboe_AudioFormat_I16: oboe_AudioFormat = 1; @@ -35,6 +35,8 @@ pub const oboe_AudioFormat_Float: oboe_AudioFormat = 2; pub const oboe_AudioFormat_I24: oboe_AudioFormat = 3; #[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)."] pub const oboe_AudioFormat_I32: oboe_AudioFormat = 4; +#[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)."] +pub const oboe_AudioFormat_IEC61937: oboe_AudioFormat = 5; #[doc = " The format of audio samples."] pub type oboe_AudioFormat = i32; pub const oboe_DataCallbackResult_Continue: oboe_DataCallbackResult = 0; @@ -199,33 +201,84 @@ pub const oboe_ChannelMask_BottomFrontRight: oboe_ChannelMask = 4194304; pub const oboe_ChannelMask_LowFrequency2: oboe_ChannelMask = 8388608; pub const oboe_ChannelMask_FrontWideLeft: oboe_ChannelMask = 16777216; pub const oboe_ChannelMask_FrontWideRight: oboe_ChannelMask = 33554432; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_Mono: oboe_ChannelMask = 1; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_Stereo: oboe_ChannelMask = 3; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM2Point1: oboe_ChannelMask = 11; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Tri: oboe_ChannelMask = 7; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_TriBack: oboe_ChannelMask = 259; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM3Point1: oboe_ChannelMask = 15; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM2Point0Point2: oboe_ChannelMask = 786435; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM2Point1Point2: oboe_ChannelMask = 786443; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM3Point0Point2: oboe_ChannelMask = 786439; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM3Point1Point2: oboe_ChannelMask = 786447; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Quad: oboe_ChannelMask = 51; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_QuadSide: oboe_ChannelMask = 1539; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Surround: oboe_ChannelMask = 263; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Penta: oboe_ChannelMask = 55; +#[doc = " Supported for Input and Output. aka 5Point1Back"] pub const oboe_ChannelMask_CM5Point1: oboe_ChannelMask = 63; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Side: oboe_ChannelMask = 1551; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM6Point1: oboe_ChannelMask = 319; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1: oboe_ChannelMask = 1599; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Point2: oboe_ChannelMask = 786495; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Point4: oboe_ChannelMask = 184383; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1Point2: oboe_ChannelMask = 788031; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1Point4: oboe_ChannelMask = 185919; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM9Point1Point4: oboe_ChannelMask = 50517567; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM9Point1Point6: oboe_ChannelMask = 51303999; +#[doc = " Supported for only Input"] pub const oboe_ChannelMask_FrontBack: oboe_ChannelMask = 260; -#[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."] +#[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."] pub type oboe_ChannelMask = u32; +#[doc = " Constant indicating that the spatialization behavior is not specified."] +pub const oboe_SpatializationBehavior_Unspecified: oboe_SpatializationBehavior = 0; +#[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."] +pub const oboe_SpatializationBehavior_Auto: oboe_SpatializationBehavior = 1; +#[doc = " Constant indicating the audio content associated with these attributes should never\n be spatialized."] +pub const oboe_SpatializationBehavior_Never: oboe_SpatializationBehavior = 2; +#[doc = " The spatialization behavior of the audio stream."] +pub type oboe_SpatializationBehavior = i32; +#[doc = " When not explicitly requested, set privacy sensitive mode according to input preset:\n communication and camcorder captures are considered privacy sensitive by default."] +pub const oboe_PrivacySensitiveMode_Unspecified: oboe_PrivacySensitiveMode = 0; +#[doc = " Privacy sensitive mode disabled."] +pub const oboe_PrivacySensitiveMode_Disabled: oboe_PrivacySensitiveMode = 1; +#[doc = " Privacy sensitive mode enabled."] +pub const oboe_PrivacySensitiveMode_Enabled: oboe_PrivacySensitiveMode = 2; +#[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)."] +pub type oboe_PrivacySensitiveMode = i32; +#[doc = " When not explicitly requested, set privacy sensitive mode according to the Usage.\n This should behave similarly to setting AllowedCapturePolicy::All."] +pub const oboe_AllowedCapturePolicy_Unspecified: oboe_AllowedCapturePolicy = 0; +#[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."] +pub const oboe_AllowedCapturePolicy_All: oboe_AllowedCapturePolicy = 1; +#[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."] +pub const oboe_AllowedCapturePolicy_System: oboe_AllowedCapturePolicy = 2; +#[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"] +pub const oboe_AllowedCapturePolicy_None: oboe_AllowedCapturePolicy = 3; +#[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."] +pub type oboe_AllowedCapturePolicy = i32; #[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
\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 
\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."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -414,10 +467,24 @@ pub struct oboe_AudioStreamBase { pub mInputPreset: oboe_InputPreset, #[doc = " Stream session ID allocation strategy. Only active on Android 28+"] pub mSessionId: oboe_SessionId, + #[doc = " Allowed Capture Policy. Only active on Android 29+"] + pub mAllowedCapturePolicy: oboe_AllowedCapturePolicy, + #[doc = " Privacy Sensitive Mode. Only active on Android 30+"] + pub mPrivacySensitiveMode: oboe_PrivacySensitiveMode, #[doc = " Control the name of the package creating the stream. Only active on Android 31+"] pub mPackageName: std_string, #[doc = " Control the attribution tag of the context creating the stream. Only active on Android 31+"] pub mAttributionTag: std_string, + #[doc = " Whether the content is already spatialized. Only used on Android 32+"] + pub mIsContentSpatialized: bool, + #[doc = " Spatialization Behavior. Only active on Android 32+"] + pub mSpatializationBehavior: oboe_SpatializationBehavior, + #[doc = " Hardware channel count. Only specified on Android 34+ AAudio streams"] + pub mHardwareChannelCount: i32, + #[doc = " Hardware sample rate. Only specified on Android 34+ AAudio streams"] + pub mHardwareSampleRate: i32, + #[doc = " Hardware format. Only specified on Android 34+ AAudio streams"] + pub mHardwareFormat: oboe_AudioFormat, pub mChannelConversionAllowed: bool, pub mFormatConversionAllowed: bool, pub mSampleRateConversionQuality: oboe_SampleRateConversionQuality, @@ -428,7 +495,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 120usize, + 148usize, concat!("Size of: ", stringify!(oboe_AudioStreamBase)) ); assert_eq!( @@ -627,8 +694,28 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mPackageName) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mAllowedCapturePolicy) as usize - ptr as usize }, 88usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mAllowedCapturePolicy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mPrivacySensitiveMode) as usize - ptr as usize }, + 92usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mPrivacySensitiveMode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mPackageName) as usize - ptr as usize }, + 96usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -638,7 +725,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mAttributionTag) as usize - ptr as usize }, - 100usize, + 108usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -646,9 +733,59 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { stringify!(mAttributionTag) ) ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mIsContentSpatialized) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mIsContentSpatialized) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mSpatializationBehavior) as usize - ptr as usize }, + 124usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mSpatializationBehavior) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareChannelCount) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareChannelCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareSampleRate) as usize - ptr as usize }, + 132usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareSampleRate) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareFormat) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareFormat) + ) + ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mChannelConversionAllowed) as usize - ptr as usize }, - 112usize, + 140usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -658,7 +795,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mFormatConversionAllowed) as usize - ptr as usize }, - 113usize, + 141usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -670,7 +807,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { unsafe { ::std::ptr::addr_of!((*ptr).mSampleRateConversionQuality) as usize - ptr as usize }, - 116usize, + 144usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -687,15 +824,14 @@ extern "C" { #[doc = " Factory class for an audio Stream."] #[repr(C)] #[repr(align(4))] -#[derive(Debug, Copy, Clone)] pub struct oboe_AudioStreamBuilder { - pub _bindgen_opaque_blob: [u32; 31usize], + pub _bindgen_opaque_blob: [u32; 38usize], } #[test] fn bindgen_test_layout_oboe_AudioStreamBuilder() { assert_eq!( ::std::mem::size_of::(), - 124usize, + 152usize, concat!("Size of: ", stringify!(oboe_AudioStreamBuilder)) ); assert_eq!( @@ -729,13 +865,13 @@ impl oboe_AudioStreamBuilder { #[repr(align(8))] #[derive(Debug, Copy, Clone)] pub struct oboe_AudioStream { - pub _bindgen_opaque_blob: [u64; 21usize], + pub _bindgen_opaque_blob: [u64; 25usize], } #[test] fn bindgen_test_layout_oboe_AudioStream() { assert_eq!( ::std::mem::size_of::(), - 168usize, + 200usize, concat!("Size of: ", stringify!(oboe_AudioStream)) ); assert_eq!( @@ -757,7 +893,7 @@ extern "C" { ) -> oboe_ResultWithValue; } extern "C" { - #[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 @param numFrames minimum frames available\n @param timeoutNanoseconds\n @return number of frames available, ErrorTimeout"] + #[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"] #[link_name = "\u{1}_ZN4oboe11AudioStream22waitForAvailableFramesEix"] pub fn oboe_AudioStream_waitForAvailableFrames( this: *mut oboe_AudioStream, @@ -871,7 +1007,7 @@ extern "C" { pub fn oboe_AudioStream_getFramesRead(this: *mut ::std::os::raw::c_void) -> i64; } extern "C" { - #[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/blob/main/docs/notes/rlsbuffer.md\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."] + #[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."] #[link_name = "\u{1}_ZN4oboe11AudioStream12getTimestampEi"] pub fn oboe_AudioStream_getTimestamp( this: *mut ::std::os::raw::c_void, @@ -1002,13 +1138,13 @@ pub struct oboe_Version { #[doc = " This is incremented when we make breaking API changes. Based loosely on https://semver.org/."] pub const oboe_Version_Major: u8 = 1; #[doc = " This is incremented when we add backwards compatible functionality. Or set to zero when MAJOR is\n incremented."] -pub const oboe_Version_Minor: u8 = 7; +pub const oboe_Version_Minor: u8 = 8; #[doc = " This is incremented when we make backwards compatible bug fixes. Or set to zero when MINOR is\n incremented."] -pub const oboe_Version_Patch: u16 = 0; +pub const oboe_Version_Patch: u16 = 1; #[doc = " Version string in the form MAJOR.MINOR.PATCH."] -pub const oboe_Version_Text: &[u8; 6usize] = b"1.7.0\0"; +pub const oboe_Version_Text: &[u8; 6] = b"1.8.1\0"; #[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."] -pub const oboe_Version_Number: u32 = 17235968; +pub const oboe_Version_Number: u32 = 17301505; #[test] fn bindgen_test_layout_oboe_Version() { assert_eq!( @@ -1142,6 +1278,9 @@ pub struct oboe_AudioStreamCallbackWrapper { } #[test] fn bindgen_test_layout_oboe_AudioStreamCallbackWrapper() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 28usize, @@ -1152,6 +1291,56 @@ fn bindgen_test_layout_oboe_AudioStreamCallbackWrapper() { 4usize, concat!("Alignment of ", stringify!(oboe_AudioStreamCallbackWrapper)) ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._context) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_context) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._drop_context) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_drop_context) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._audio_ready) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_audio_ready) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._before_close) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_before_close) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._after_close) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_after_close) + ) + ); } extern "C" { #[link_name = "\u{1}_ZN4oboe26AudioStreamCallbackWrapperC1EPvPFvS1_EPFNS_18DataCallbackResultES1_PNS_11AudioStreamES1_iEPFvS1_S6_NS_6ResultEESB_"] diff --git a/sys/src/bindings_i686.rs b/sys/src/bindings_i686.rs index 73e2a47..ce3ca69 100644 --- a/sys/src/bindings_i686.rs +++ b/sys/src/bindings_i686.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.63.0 */ +/* automatically generated by rust-bindgen 0.69.4 */ pub type std_string = [u32; 3usize]; pub const oboe_StreamState_Uninitialized: oboe_StreamState = 0; @@ -25,7 +25,7 @@ pub const oboe_Direction_Input: oboe_Direction = 1; pub type oboe_Direction = i32; #[doc = " Invalid format."] pub const oboe_AudioFormat_Invalid: oboe_AudioFormat = -1; -#[doc = " Unspecified format. Format will be decided by Oboe."] +#[doc = " Unspecified format. Format will be decided by Oboe.\n When calling getHardwareFormat(), this will be returned if\n the API is not supported."] pub const oboe_AudioFormat_Unspecified: oboe_AudioFormat = 0; #[doc = " Signed 16-bit integers."] pub const oboe_AudioFormat_I16: oboe_AudioFormat = 1; @@ -35,6 +35,8 @@ pub const oboe_AudioFormat_Float: oboe_AudioFormat = 2; pub const oboe_AudioFormat_I24: oboe_AudioFormat = 3; #[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)."] pub const oboe_AudioFormat_I32: oboe_AudioFormat = 4; +#[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)."] +pub const oboe_AudioFormat_IEC61937: oboe_AudioFormat = 5; #[doc = " The format of audio samples."] pub type oboe_AudioFormat = i32; pub const oboe_DataCallbackResult_Continue: oboe_DataCallbackResult = 0; @@ -199,33 +201,84 @@ pub const oboe_ChannelMask_BottomFrontRight: oboe_ChannelMask = 4194304; pub const oboe_ChannelMask_LowFrequency2: oboe_ChannelMask = 8388608; pub const oboe_ChannelMask_FrontWideLeft: oboe_ChannelMask = 16777216; pub const oboe_ChannelMask_FrontWideRight: oboe_ChannelMask = 33554432; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_Mono: oboe_ChannelMask = 1; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_Stereo: oboe_ChannelMask = 3; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM2Point1: oboe_ChannelMask = 11; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Tri: oboe_ChannelMask = 7; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_TriBack: oboe_ChannelMask = 259; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM3Point1: oboe_ChannelMask = 15; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM2Point0Point2: oboe_ChannelMask = 786435; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM2Point1Point2: oboe_ChannelMask = 786443; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM3Point0Point2: oboe_ChannelMask = 786439; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM3Point1Point2: oboe_ChannelMask = 786447; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Quad: oboe_ChannelMask = 51; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_QuadSide: oboe_ChannelMask = 1539; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Surround: oboe_ChannelMask = 263; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Penta: oboe_ChannelMask = 55; +#[doc = " Supported for Input and Output. aka 5Point1Back"] pub const oboe_ChannelMask_CM5Point1: oboe_ChannelMask = 63; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Side: oboe_ChannelMask = 1551; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM6Point1: oboe_ChannelMask = 319; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1: oboe_ChannelMask = 1599; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Point2: oboe_ChannelMask = 786495; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Point4: oboe_ChannelMask = 184383; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1Point2: oboe_ChannelMask = 788031; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1Point4: oboe_ChannelMask = 185919; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM9Point1Point4: oboe_ChannelMask = 50517567; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM9Point1Point6: oboe_ChannelMask = 51303999; +#[doc = " Supported for only Input"] pub const oboe_ChannelMask_FrontBack: oboe_ChannelMask = 260; -#[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."] +#[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."] pub type oboe_ChannelMask = u32; +#[doc = " Constant indicating that the spatialization behavior is not specified."] +pub const oboe_SpatializationBehavior_Unspecified: oboe_SpatializationBehavior = 0; +#[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."] +pub const oboe_SpatializationBehavior_Auto: oboe_SpatializationBehavior = 1; +#[doc = " Constant indicating the audio content associated with these attributes should never\n be spatialized."] +pub const oboe_SpatializationBehavior_Never: oboe_SpatializationBehavior = 2; +#[doc = " The spatialization behavior of the audio stream."] +pub type oboe_SpatializationBehavior = i32; +#[doc = " When not explicitly requested, set privacy sensitive mode according to input preset:\n communication and camcorder captures are considered privacy sensitive by default."] +pub const oboe_PrivacySensitiveMode_Unspecified: oboe_PrivacySensitiveMode = 0; +#[doc = " Privacy sensitive mode disabled."] +pub const oboe_PrivacySensitiveMode_Disabled: oboe_PrivacySensitiveMode = 1; +#[doc = " Privacy sensitive mode enabled."] +pub const oboe_PrivacySensitiveMode_Enabled: oboe_PrivacySensitiveMode = 2; +#[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)."] +pub type oboe_PrivacySensitiveMode = i32; +#[doc = " When not explicitly requested, set privacy sensitive mode according to the Usage.\n This should behave similarly to setting AllowedCapturePolicy::All."] +pub const oboe_AllowedCapturePolicy_Unspecified: oboe_AllowedCapturePolicy = 0; +#[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."] +pub const oboe_AllowedCapturePolicy_All: oboe_AllowedCapturePolicy = 1; +#[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."] +pub const oboe_AllowedCapturePolicy_System: oboe_AllowedCapturePolicy = 2; +#[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"] +pub const oboe_AllowedCapturePolicy_None: oboe_AllowedCapturePolicy = 3; +#[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."] +pub type oboe_AllowedCapturePolicy = i32; #[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
\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 
\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."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -414,10 +467,24 @@ pub struct oboe_AudioStreamBase { pub mInputPreset: oboe_InputPreset, #[doc = " Stream session ID allocation strategy. Only active on Android 28+"] pub mSessionId: oboe_SessionId, + #[doc = " Allowed Capture Policy. Only active on Android 29+"] + pub mAllowedCapturePolicy: oboe_AllowedCapturePolicy, + #[doc = " Privacy Sensitive Mode. Only active on Android 30+"] + pub mPrivacySensitiveMode: oboe_PrivacySensitiveMode, #[doc = " Control the name of the package creating the stream. Only active on Android 31+"] pub mPackageName: std_string, #[doc = " Control the attribution tag of the context creating the stream. Only active on Android 31+"] pub mAttributionTag: std_string, + #[doc = " Whether the content is already spatialized. Only used on Android 32+"] + pub mIsContentSpatialized: bool, + #[doc = " Spatialization Behavior. Only active on Android 32+"] + pub mSpatializationBehavior: oboe_SpatializationBehavior, + #[doc = " Hardware channel count. Only specified on Android 34+ AAudio streams"] + pub mHardwareChannelCount: i32, + #[doc = " Hardware sample rate. Only specified on Android 34+ AAudio streams"] + pub mHardwareSampleRate: i32, + #[doc = " Hardware format. Only specified on Android 34+ AAudio streams"] + pub mHardwareFormat: oboe_AudioFormat, pub mChannelConversionAllowed: bool, pub mFormatConversionAllowed: bool, pub mSampleRateConversionQuality: oboe_SampleRateConversionQuality, @@ -428,7 +495,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 120usize, + 148usize, concat!("Size of: ", stringify!(oboe_AudioStreamBase)) ); assert_eq!( @@ -627,8 +694,28 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mPackageName) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mAllowedCapturePolicy) as usize - ptr as usize }, 88usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mAllowedCapturePolicy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mPrivacySensitiveMode) as usize - ptr as usize }, + 92usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mPrivacySensitiveMode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mPackageName) as usize - ptr as usize }, + 96usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -638,7 +725,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mAttributionTag) as usize - ptr as usize }, - 100usize, + 108usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -646,9 +733,59 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { stringify!(mAttributionTag) ) ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mIsContentSpatialized) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mIsContentSpatialized) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mSpatializationBehavior) as usize - ptr as usize }, + 124usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mSpatializationBehavior) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareChannelCount) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareChannelCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareSampleRate) as usize - ptr as usize }, + 132usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareSampleRate) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareFormat) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareFormat) + ) + ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mChannelConversionAllowed) as usize - ptr as usize }, - 112usize, + 140usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -658,7 +795,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mFormatConversionAllowed) as usize - ptr as usize }, - 113usize, + 141usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -670,7 +807,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { unsafe { ::std::ptr::addr_of!((*ptr).mSampleRateConversionQuality) as usize - ptr as usize }, - 116usize, + 144usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -687,15 +824,14 @@ extern "C" { #[doc = " Factory class for an audio Stream."] #[repr(C)] #[repr(align(4))] -#[derive(Debug, Copy, Clone)] pub struct oboe_AudioStreamBuilder { - pub _bindgen_opaque_blob: [u32; 31usize], + pub _bindgen_opaque_blob: [u32; 38usize], } #[test] fn bindgen_test_layout_oboe_AudioStreamBuilder() { assert_eq!( ::std::mem::size_of::(), - 124usize, + 152usize, concat!("Size of: ", stringify!(oboe_AudioStreamBuilder)) ); assert_eq!( @@ -729,13 +865,13 @@ impl oboe_AudioStreamBuilder { #[repr(align(8))] #[derive(Debug, Copy, Clone)] pub struct oboe_AudioStream { - pub _bindgen_opaque_blob: [u64; 21usize], + pub _bindgen_opaque_blob: [u64; 25usize], } #[test] fn bindgen_test_layout_oboe_AudioStream() { assert_eq!( ::std::mem::size_of::(), - 168usize, + 200usize, concat!("Size of: ", stringify!(oboe_AudioStream)) ); assert_eq!( @@ -757,7 +893,7 @@ extern "C" { ) -> oboe_ResultWithValue; } extern "C" { - #[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 @param numFrames minimum frames available\n @param timeoutNanoseconds\n @return number of frames available, ErrorTimeout"] + #[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"] #[link_name = "\u{1}_ZN4oboe11AudioStream22waitForAvailableFramesEix"] pub fn oboe_AudioStream_waitForAvailableFrames( this: *mut oboe_AudioStream, @@ -871,7 +1007,7 @@ extern "C" { pub fn oboe_AudioStream_getFramesRead(this: *mut ::std::os::raw::c_void) -> i64; } extern "C" { - #[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/blob/main/docs/notes/rlsbuffer.md\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."] + #[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."] #[link_name = "\u{1}_ZN4oboe11AudioStream12getTimestampEi"] pub fn oboe_AudioStream_getTimestamp( this: *mut ::std::os::raw::c_void, @@ -1002,13 +1138,13 @@ pub struct oboe_Version { #[doc = " This is incremented when we make breaking API changes. Based loosely on https://semver.org/."] pub const oboe_Version_Major: u8 = 1; #[doc = " This is incremented when we add backwards compatible functionality. Or set to zero when MAJOR is\n incremented."] -pub const oboe_Version_Minor: u8 = 7; +pub const oboe_Version_Minor: u8 = 8; #[doc = " This is incremented when we make backwards compatible bug fixes. Or set to zero when MINOR is\n incremented."] -pub const oboe_Version_Patch: u16 = 0; +pub const oboe_Version_Patch: u16 = 1; #[doc = " Version string in the form MAJOR.MINOR.PATCH."] -pub const oboe_Version_Text: &[u8; 6usize] = b"1.7.0\0"; +pub const oboe_Version_Text: &[u8; 6] = b"1.8.1\0"; #[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."] -pub const oboe_Version_Number: u32 = 17235968; +pub const oboe_Version_Number: u32 = 17301505; #[test] fn bindgen_test_layout_oboe_Version() { assert_eq!( @@ -1142,6 +1278,9 @@ pub struct oboe_AudioStreamCallbackWrapper { } #[test] fn bindgen_test_layout_oboe_AudioStreamCallbackWrapper() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 28usize, @@ -1152,6 +1291,56 @@ fn bindgen_test_layout_oboe_AudioStreamCallbackWrapper() { 4usize, concat!("Alignment of ", stringify!(oboe_AudioStreamCallbackWrapper)) ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._context) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_context) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._drop_context) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_drop_context) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._audio_ready) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_audio_ready) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._before_close) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_before_close) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._after_close) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_after_close) + ) + ); } extern "C" { #[link_name = "\u{1}_ZN4oboe26AudioStreamCallbackWrapperC1EPvPFvS1_EPFNS_18DataCallbackResultES1_PNS_11AudioStreamES1_iEPFvS1_S6_NS_6ResultEESB_"] diff --git a/sys/src/bindings_x86_64.rs b/sys/src/bindings_x86_64.rs index 7b96b9f..114f4e9 100644 --- a/sys/src/bindings_x86_64.rs +++ b/sys/src/bindings_x86_64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.63.0 */ +/* automatically generated by rust-bindgen 0.69.4 */ pub type std_string = [u64; 3usize]; pub const oboe_StreamState_Uninitialized: oboe_StreamState = 0; @@ -25,7 +25,7 @@ pub const oboe_Direction_Input: oboe_Direction = 1; pub type oboe_Direction = i32; #[doc = " Invalid format."] pub const oboe_AudioFormat_Invalid: oboe_AudioFormat = -1; -#[doc = " Unspecified format. Format will be decided by Oboe."] +#[doc = " Unspecified format. Format will be decided by Oboe.\n When calling getHardwareFormat(), this will be returned if\n the API is not supported."] pub const oboe_AudioFormat_Unspecified: oboe_AudioFormat = 0; #[doc = " Signed 16-bit integers."] pub const oboe_AudioFormat_I16: oboe_AudioFormat = 1; @@ -35,6 +35,8 @@ pub const oboe_AudioFormat_Float: oboe_AudioFormat = 2; pub const oboe_AudioFormat_I24: oboe_AudioFormat = 3; #[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)."] pub const oboe_AudioFormat_I32: oboe_AudioFormat = 4; +#[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)."] +pub const oboe_AudioFormat_IEC61937: oboe_AudioFormat = 5; #[doc = " The format of audio samples."] pub type oboe_AudioFormat = i32; pub const oboe_DataCallbackResult_Continue: oboe_DataCallbackResult = 0; @@ -199,33 +201,84 @@ pub const oboe_ChannelMask_BottomFrontRight: oboe_ChannelMask = 4194304; pub const oboe_ChannelMask_LowFrequency2: oboe_ChannelMask = 8388608; pub const oboe_ChannelMask_FrontWideLeft: oboe_ChannelMask = 16777216; pub const oboe_ChannelMask_FrontWideRight: oboe_ChannelMask = 33554432; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_Mono: oboe_ChannelMask = 1; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_Stereo: oboe_ChannelMask = 3; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM2Point1: oboe_ChannelMask = 11; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Tri: oboe_ChannelMask = 7; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_TriBack: oboe_ChannelMask = 259; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM3Point1: oboe_ChannelMask = 15; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM2Point0Point2: oboe_ChannelMask = 786435; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM2Point1Point2: oboe_ChannelMask = 786443; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM3Point0Point2: oboe_ChannelMask = 786439; +#[doc = " Supported for Input and Output"] pub const oboe_ChannelMask_CM3Point1Point2: oboe_ChannelMask = 786447; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Quad: oboe_ChannelMask = 51; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_QuadSide: oboe_ChannelMask = 1539; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Surround: oboe_ChannelMask = 263; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_Penta: oboe_ChannelMask = 55; +#[doc = " Supported for Input and Output. aka 5Point1Back"] pub const oboe_ChannelMask_CM5Point1: oboe_ChannelMask = 63; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Side: oboe_ChannelMask = 1551; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM6Point1: oboe_ChannelMask = 319; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1: oboe_ChannelMask = 1599; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Point2: oboe_ChannelMask = 786495; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM5Point1Point4: oboe_ChannelMask = 184383; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1Point2: oboe_ChannelMask = 788031; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM7Point1Point4: oboe_ChannelMask = 185919; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM9Point1Point4: oboe_ChannelMask = 50517567; +#[doc = " Supported for only Output"] pub const oboe_ChannelMask_CM9Point1Point6: oboe_ChannelMask = 51303999; +#[doc = " Supported for only Input"] pub const oboe_ChannelMask_FrontBack: oboe_ChannelMask = 260; -#[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."] +#[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."] pub type oboe_ChannelMask = u32; +#[doc = " Constant indicating that the spatialization behavior is not specified."] +pub const oboe_SpatializationBehavior_Unspecified: oboe_SpatializationBehavior = 0; +#[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."] +pub const oboe_SpatializationBehavior_Auto: oboe_SpatializationBehavior = 1; +#[doc = " Constant indicating the audio content associated with these attributes should never\n be spatialized."] +pub const oboe_SpatializationBehavior_Never: oboe_SpatializationBehavior = 2; +#[doc = " The spatialization behavior of the audio stream."] +pub type oboe_SpatializationBehavior = i32; +#[doc = " When not explicitly requested, set privacy sensitive mode according to input preset:\n communication and camcorder captures are considered privacy sensitive by default."] +pub const oboe_PrivacySensitiveMode_Unspecified: oboe_PrivacySensitiveMode = 0; +#[doc = " Privacy sensitive mode disabled."] +pub const oboe_PrivacySensitiveMode_Disabled: oboe_PrivacySensitiveMode = 1; +#[doc = " Privacy sensitive mode enabled."] +pub const oboe_PrivacySensitiveMode_Enabled: oboe_PrivacySensitiveMode = 2; +#[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)."] +pub type oboe_PrivacySensitiveMode = i32; +#[doc = " When not explicitly requested, set privacy sensitive mode according to the Usage.\n This should behave similarly to setting AllowedCapturePolicy::All."] +pub const oboe_AllowedCapturePolicy_Unspecified: oboe_AllowedCapturePolicy = 0; +#[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."] +pub const oboe_AllowedCapturePolicy_All: oboe_AllowedCapturePolicy = 1; +#[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."] +pub const oboe_AllowedCapturePolicy_System: oboe_AllowedCapturePolicy = 2; +#[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"] +pub const oboe_AllowedCapturePolicy_None: oboe_AllowedCapturePolicy = 3; +#[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."] +pub type oboe_AllowedCapturePolicy = i32; #[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
\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 
\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."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -414,10 +467,24 @@ pub struct oboe_AudioStreamBase { pub mInputPreset: oboe_InputPreset, #[doc = " Stream session ID allocation strategy. Only active on Android 28+"] pub mSessionId: oboe_SessionId, + #[doc = " Allowed Capture Policy. Only active on Android 29+"] + pub mAllowedCapturePolicy: oboe_AllowedCapturePolicy, + #[doc = " Privacy Sensitive Mode. Only active on Android 30+"] + pub mPrivacySensitiveMode: oboe_PrivacySensitiveMode, #[doc = " Control the name of the package creating the stream. Only active on Android 31+"] pub mPackageName: std_string, #[doc = " Control the attribution tag of the context creating the stream. Only active on Android 31+"] pub mAttributionTag: std_string, + #[doc = " Whether the content is already spatialized. Only used on Android 32+"] + pub mIsContentSpatialized: bool, + #[doc = " Spatialization Behavior. Only active on Android 32+"] + pub mSpatializationBehavior: oboe_SpatializationBehavior, + #[doc = " Hardware channel count. Only specified on Android 34+ AAudio streams"] + pub mHardwareChannelCount: i32, + #[doc = " Hardware sample rate. Only specified on Android 34+ AAudio streams"] + pub mHardwareSampleRate: i32, + #[doc = " Hardware format. Only specified on Android 34+ AAudio streams"] + pub mHardwareFormat: oboe_AudioFormat, pub mChannelConversionAllowed: bool, pub mFormatConversionAllowed: bool, pub mSampleRateConversionQuality: oboe_SampleRateConversionQuality, @@ -428,7 +495,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 176usize, + 208usize, concat!("Size of: ", stringify!(oboe_AudioStreamBase)) ); assert_eq!( @@ -627,8 +694,28 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ) ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mPackageName) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mAllowedCapturePolicy) as usize - ptr as usize }, + 116usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mAllowedCapturePolicy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mPrivacySensitiveMode) as usize - ptr as usize }, 120usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mPrivacySensitiveMode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mPackageName) as usize - ptr as usize }, + 128usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -638,7 +725,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mAttributionTag) as usize - ptr as usize }, - 144usize, + 152usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -646,9 +733,59 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { stringify!(mAttributionTag) ) ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mIsContentSpatialized) as usize - ptr as usize }, + 176usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mIsContentSpatialized) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mSpatializationBehavior) as usize - ptr as usize }, + 180usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mSpatializationBehavior) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareChannelCount) as usize - ptr as usize }, + 184usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareChannelCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareSampleRate) as usize - ptr as usize }, + 188usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareSampleRate) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mHardwareFormat) as usize - ptr as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamBase), + "::", + stringify!(mHardwareFormat) + ) + ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mChannelConversionAllowed) as usize - ptr as usize }, - 168usize, + 196usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -658,7 +795,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mFormatConversionAllowed) as usize - ptr as usize }, - 169usize, + 197usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -670,7 +807,7 @@ fn bindgen_test_layout_oboe_AudioStreamBase() { unsafe { ::std::ptr::addr_of!((*ptr).mSampleRateConversionQuality) as usize - ptr as usize }, - 172usize, + 200usize, concat!( "Offset of field: ", stringify!(oboe_AudioStreamBase), @@ -689,13 +826,13 @@ extern "C" { #[repr(align(8))] #[derive(Debug, Copy, Clone)] pub struct oboe_AudioStreamBuilder { - pub _bindgen_opaque_blob: [u64; 23usize], + pub _bindgen_opaque_blob: [u64; 26usize], } #[test] fn bindgen_test_layout_oboe_AudioStreamBuilder() { assert_eq!( ::std::mem::size_of::(), - 184usize, + 208usize, concat!("Size of: ", stringify!(oboe_AudioStreamBuilder)) ); assert_eq!( @@ -728,13 +865,13 @@ impl oboe_AudioStreamBuilder { #[repr(C)] #[repr(align(8))] pub struct oboe_AudioStream { - pub _bindgen_opaque_blob: [u64; 34usize], + pub _bindgen_opaque_blob: [u64; 38usize], } #[test] fn bindgen_test_layout_oboe_AudioStream() { assert_eq!( ::std::mem::size_of::(), - 272usize, + 304usize, concat!("Size of: ", stringify!(oboe_AudioStream)) ); assert_eq!( @@ -756,7 +893,7 @@ extern "C" { ) -> oboe_ResultWithValue; } extern "C" { - #[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 @param numFrames minimum frames available\n @param timeoutNanoseconds\n @return number of frames available, ErrorTimeout"] + #[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"] #[link_name = "\u{1}_ZN4oboe11AudioStream22waitForAvailableFramesEil"] pub fn oboe_AudioStream_waitForAvailableFrames( this: *mut oboe_AudioStream, @@ -870,7 +1007,7 @@ extern "C" { pub fn oboe_AudioStream_getFramesRead(this: *mut ::std::os::raw::c_void) -> i64; } extern "C" { - #[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/blob/main/docs/notes/rlsbuffer.md\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."] + #[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."] #[link_name = "\u{1}_ZN4oboe11AudioStream12getTimestampEi"] pub fn oboe_AudioStream_getTimestamp( this: *mut ::std::os::raw::c_void, @@ -1001,13 +1138,13 @@ pub struct oboe_Version { #[doc = " This is incremented when we make breaking API changes. Based loosely on https://semver.org/."] pub const oboe_Version_Major: u8 = 1; #[doc = " This is incremented when we add backwards compatible functionality. Or set to zero when MAJOR is\n incremented."] -pub const oboe_Version_Minor: u8 = 7; +pub const oboe_Version_Minor: u8 = 8; #[doc = " This is incremented when we make backwards compatible bug fixes. Or set to zero when MINOR is\n incremented."] -pub const oboe_Version_Patch: u16 = 0; +pub const oboe_Version_Patch: u16 = 1; #[doc = " Version string in the form MAJOR.MINOR.PATCH."] -pub const oboe_Version_Text: &[u8; 6usize] = b"1.7.0\0"; +pub const oboe_Version_Text: &[u8; 6] = b"1.8.1\0"; #[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."] -pub const oboe_Version_Number: u32 = 17235968; +pub const oboe_Version_Number: u32 = 17301505; #[test] fn bindgen_test_layout_oboe_Version() { assert_eq!( @@ -1141,6 +1278,9 @@ pub struct oboe_AudioStreamCallbackWrapper { } #[test] fn bindgen_test_layout_oboe_AudioStreamCallbackWrapper() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, @@ -1151,6 +1291,56 @@ fn bindgen_test_layout_oboe_AudioStreamCallbackWrapper() { 8usize, concat!("Alignment of ", stringify!(oboe_AudioStreamCallbackWrapper)) ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._context) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_context) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._drop_context) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_drop_context) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._audio_ready) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_audio_ready) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._before_close) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_before_close) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._after_close) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(oboe_AudioStreamCallbackWrapper), + "::", + stringify!(_after_close) + ) + ); } extern "C" { #[link_name = "\u{1}_ZN4oboe26AudioStreamCallbackWrapperC1EPvPFvS1_EPFNS_18DataCallbackResultES1_PNS_11AudioStreamES1_iEPFvS1_S6_NS_6ResultEESB_"]