Skip to content

Commit

Permalink
13021268
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Feb 6, 2025
1 parent 7d6c0b7 commit 775f00d
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ndk-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ndk-sys"
version = "0.6.0+12855349"
version = "0.6.0+13021268"
authors = ["The Rust Windowing contributors"]
edition = "2021"
description = "FFI bindings for the Android NDK"
Expand Down
38 changes: 37 additions & 1 deletion ndk-sys/src/ffi_aarch64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ pub const NL_TEXTMAX: u32 = 255;
pub const PASS_MAX: u32 = 128;
pub const LONG_BIT: u32 = 64;
pub const WORD_BIT: u32 = 32;
pub const NSIG_MAX: u32 = 65;
pub const MB_LEN_MAX: u32 = 4;
pub const NZERO: u32 = 20;
pub const IOV_MAX: u32 = 1024;
Expand Down Expand Up @@ -1146,8 +1147,8 @@ pub const SS_ONSTACK: u32 = 1;
pub const SS_DISABLE: u32 = 2;
pub const SS_AUTODISARM: u32 = 2147483648;
pub const SS_FLAG_BITS: u32 = 2147483648;
pub const _NSIG: u32 = 65;
pub const NSIG: u32 = 65;
pub const _NSIG: u32 = 65;
pub const NGREG: u32 = 34;
pub const SIG2STR_MAX: u32 = 32;
pub const FD_SETSIZE: u32 = 1024;
Expand Down Expand Up @@ -1304,6 +1305,7 @@ pub const _SC_LEVEL3_CACHE_LINESIZE: u32 = 154;
pub const _SC_LEVEL4_CACHE_SIZE: u32 = 155;
pub const _SC_LEVEL4_CACHE_ASSOC: u32 = 156;
pub const _SC_LEVEL4_CACHE_LINESIZE: u32 = 157;
pub const _SC_NSIG: u32 = 158;
pub const STDIN_FILENO: u32 = 0;
pub const STDOUT_FILENO: u32 = 1;
pub const STDERR_FILENO: u32 = 2;
Expand Down Expand Up @@ -11333,6 +11335,13 @@ pub const AAUDIO_FORMAT_PCM_FLOAT: _bindgen_ty_49 = 2;
pub const AAUDIO_FORMAT_PCM_I24_PACKED: _bindgen_ty_49 = 3;
pub const AAUDIO_FORMAT_PCM_I32: _bindgen_ty_49 = 4;
pub const AAUDIO_FORMAT_IEC61937: _bindgen_ty_49 = 5;
pub const AAUDIO_FORMAT_MP3: _bindgen_ty_49 = 6;
pub const AAUDIO_FORMAT_AAC_LC: _bindgen_ty_49 = 7;
pub const AAUDIO_FORMAT_AAC_HE_V1: _bindgen_ty_49 = 8;
pub const AAUDIO_FORMAT_AAC_HE_V2: _bindgen_ty_49 = 9;
pub const AAUDIO_FORMAT_AAC_ELD: _bindgen_ty_49 = 10;
pub const AAUDIO_FORMAT_AAC_XHE: _bindgen_ty_49 = 11;
pub const AAUDIO_FORMAT_OPUS: _bindgen_ty_49 = 12;
pub type _bindgen_ty_49 = ::std::os::raw::c_int;
pub type aaudio_format_t = i32;
pub const AAUDIO_OK: _bindgen_ty_50 = 0;
Expand Down Expand Up @@ -11378,6 +11387,7 @@ pub type aaudio_sharing_mode_t = i32;
pub const AAUDIO_PERFORMANCE_MODE_NONE: _bindgen_ty_53 = 10;
pub const AAUDIO_PERFORMANCE_MODE_POWER_SAVING: _bindgen_ty_53 = 11;
pub const AAUDIO_PERFORMANCE_MODE_LOW_LATENCY: _bindgen_ty_53 = 12;
pub const AAUDIO_PERFORMANCE_MODE_POWER_SAVING_OFFLOADED: _bindgen_ty_53 = 13;
pub type _bindgen_ty_53 = ::std::os::raw::c_uint;
pub type aaudio_performance_mode_t = i32;
pub const AAUDIO_USAGE_MEDIA: _bindgen_ty_54 = 1;
Expand Down Expand Up @@ -11649,6 +11659,16 @@ unsafe extern "C" {
userData: *mut ::std::os::raw::c_void,
);
}
pub type AAudioStream_presentationEndCallback = ::std::option::Option<
unsafe extern "C" fn(stream: *mut AAudioStream, userData: *mut ::std::os::raw::c_void),
>;
unsafe extern "C" {
pub fn AAudioStreamBuilder_setPresentationEndCallback(
builder: *mut AAudioStreamBuilder,
callback: AAudioStream_presentationEndCallback,
userData: *mut ::std::os::raw::c_void,
);
}
unsafe extern "C" {
pub fn AAudioStreamBuilder_openStream(
builder: *mut AAudioStreamBuilder,
Expand Down Expand Up @@ -11808,6 +11828,22 @@ unsafe extern "C" {
unsafe extern "C" {
pub fn AAudioStream_getChannelMask(stream: *mut AAudioStream) -> aaudio_channel_mask_t;
}
unsafe extern "C" {
pub fn AAudioStream_setOffloadDelayPadding(
stream: *mut AAudioStream,
delayInFrames: i32,
paddingInFrames: i32,
) -> aaudio_result_t;
}
unsafe extern "C" {
pub fn AAudioStream_getOffloadDelay(stream: *mut AAudioStream) -> i32;
}
unsafe extern "C" {
pub fn AAudioStream_getOffloadPadding(stream: *mut AAudioStream) -> i32;
}
unsafe extern "C" {
pub fn AAudioStream_setOffloadEndOfStream(stream: *mut AAudioStream) -> aaudio_result_t;
}
impl media_status_t {
pub const AMEDIA_OK: media_status_t = media_status_t(0);
}
Expand Down
40 changes: 38 additions & 2 deletions ndk-sys/src/ffi_arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@ pub const NL_TEXTMAX: u32 = 255;
pub const PASS_MAX: u32 = 128;
pub const LONG_BIT: u32 = 32;
pub const WORD_BIT: u32 = 32;
pub const NSIG_MAX: u32 = 65;
pub const MB_LEN_MAX: u32 = 4;
pub const NZERO: u32 = 20;
pub const IOV_MAX: u32 = 1024;
Expand Down Expand Up @@ -1196,9 +1197,9 @@ pub const SS_ONSTACK: u32 = 1;
pub const SS_DISABLE: u32 = 2;
pub const SS_AUTODISARM: u32 = 2147483648;
pub const SS_FLAG_BITS: u32 = 2147483648;
pub const _KERNEL__NSIG: u32 = 64;
pub const _NSIG: u32 = 65;
pub const NSIG: u32 = 65;
pub const _NSIG: u32 = 65;
pub const _KERNEL__NSIG: u32 = 64;
pub const PAGE_SIZE: u32 = 4096;
pub const PAGE_MASK: i32 = -4096;
pub const NGREG: u32 = 18;
Expand Down Expand Up @@ -1357,6 +1358,7 @@ pub const _SC_LEVEL3_CACHE_LINESIZE: u32 = 154;
pub const _SC_LEVEL4_CACHE_SIZE: u32 = 155;
pub const _SC_LEVEL4_CACHE_ASSOC: u32 = 156;
pub const _SC_LEVEL4_CACHE_LINESIZE: u32 = 157;
pub const _SC_NSIG: u32 = 158;
pub const STDIN_FILENO: u32 = 0;
pub const STDOUT_FILENO: u32 = 1;
pub const STDERR_FILENO: u32 = 2;
Expand Down Expand Up @@ -11734,6 +11736,13 @@ pub const AAUDIO_FORMAT_PCM_FLOAT: _bindgen_ty_50 = 2;
pub const AAUDIO_FORMAT_PCM_I24_PACKED: _bindgen_ty_50 = 3;
pub const AAUDIO_FORMAT_PCM_I32: _bindgen_ty_50 = 4;
pub const AAUDIO_FORMAT_IEC61937: _bindgen_ty_50 = 5;
pub const AAUDIO_FORMAT_MP3: _bindgen_ty_50 = 6;
pub const AAUDIO_FORMAT_AAC_LC: _bindgen_ty_50 = 7;
pub const AAUDIO_FORMAT_AAC_HE_V1: _bindgen_ty_50 = 8;
pub const AAUDIO_FORMAT_AAC_HE_V2: _bindgen_ty_50 = 9;
pub const AAUDIO_FORMAT_AAC_ELD: _bindgen_ty_50 = 10;
pub const AAUDIO_FORMAT_AAC_XHE: _bindgen_ty_50 = 11;
pub const AAUDIO_FORMAT_OPUS: _bindgen_ty_50 = 12;
pub type _bindgen_ty_50 = ::std::os::raw::c_int;
pub type aaudio_format_t = i32;
pub const AAUDIO_OK: _bindgen_ty_51 = 0;
Expand Down Expand Up @@ -11779,6 +11788,7 @@ pub type aaudio_sharing_mode_t = i32;
pub const AAUDIO_PERFORMANCE_MODE_NONE: _bindgen_ty_54 = 10;
pub const AAUDIO_PERFORMANCE_MODE_POWER_SAVING: _bindgen_ty_54 = 11;
pub const AAUDIO_PERFORMANCE_MODE_LOW_LATENCY: _bindgen_ty_54 = 12;
pub const AAUDIO_PERFORMANCE_MODE_POWER_SAVING_OFFLOADED: _bindgen_ty_54 = 13;
pub type _bindgen_ty_54 = ::std::os::raw::c_uint;
pub type aaudio_performance_mode_t = i32;
pub const AAUDIO_USAGE_MEDIA: _bindgen_ty_55 = 1;
Expand Down Expand Up @@ -12050,6 +12060,16 @@ unsafe extern "C" {
userData: *mut ::std::os::raw::c_void,
);
}
pub type AAudioStream_presentationEndCallback = ::std::option::Option<
unsafe extern "C" fn(stream: *mut AAudioStream, userData: *mut ::std::os::raw::c_void),
>;
unsafe extern "C" {
pub fn AAudioStreamBuilder_setPresentationEndCallback(
builder: *mut AAudioStreamBuilder,
callback: AAudioStream_presentationEndCallback,
userData: *mut ::std::os::raw::c_void,
);
}
unsafe extern "C" {
pub fn AAudioStreamBuilder_openStream(
builder: *mut AAudioStreamBuilder,
Expand Down Expand Up @@ -12209,6 +12229,22 @@ unsafe extern "C" {
unsafe extern "C" {
pub fn AAudioStream_getChannelMask(stream: *mut AAudioStream) -> aaudio_channel_mask_t;
}
unsafe extern "C" {
pub fn AAudioStream_setOffloadDelayPadding(
stream: *mut AAudioStream,
delayInFrames: i32,
paddingInFrames: i32,
) -> aaudio_result_t;
}
unsafe extern "C" {
pub fn AAudioStream_getOffloadDelay(stream: *mut AAudioStream) -> i32;
}
unsafe extern "C" {
pub fn AAudioStream_getOffloadPadding(stream: *mut AAudioStream) -> i32;
}
unsafe extern "C" {
pub fn AAudioStream_setOffloadEndOfStream(stream: *mut AAudioStream) -> aaudio_result_t;
}
impl media_status_t {
pub const AMEDIA_OK: media_status_t = media_status_t(0);
}
Expand Down
40 changes: 38 additions & 2 deletions ndk-sys/src/ffi_i686.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,7 @@ pub const NL_TEXTMAX: u32 = 255;
pub const PASS_MAX: u32 = 128;
pub const LONG_BIT: u32 = 32;
pub const WORD_BIT: u32 = 32;
pub const NSIG_MAX: u32 = 65;
pub const MB_LEN_MAX: u32 = 4;
pub const NZERO: u32 = 20;
pub const IOV_MAX: u32 = 1024;
Expand Down Expand Up @@ -1059,9 +1060,9 @@ pub const SS_ONSTACK: u32 = 1;
pub const SS_DISABLE: u32 = 2;
pub const SS_AUTODISARM: u32 = 2147483648;
pub const SS_FLAG_BITS: u32 = 2147483648;
pub const _KERNEL__NSIG: u32 = 64;
pub const _NSIG: u32 = 65;
pub const NSIG: u32 = 65;
pub const _NSIG: u32 = 65;
pub const _KERNEL__NSIG: u32 = 64;
pub const PAGE_SIZE: u32 = 4096;
pub const PAGE_MASK: i32 = -4096;
pub const UPAGES: u32 = 1;
Expand Down Expand Up @@ -1220,6 +1221,7 @@ pub const _SC_LEVEL3_CACHE_LINESIZE: u32 = 154;
pub const _SC_LEVEL4_CACHE_SIZE: u32 = 155;
pub const _SC_LEVEL4_CACHE_ASSOC: u32 = 156;
pub const _SC_LEVEL4_CACHE_LINESIZE: u32 = 157;
pub const _SC_NSIG: u32 = 158;
pub const STDIN_FILENO: u32 = 0;
pub const STDOUT_FILENO: u32 = 1;
pub const STDERR_FILENO: u32 = 2;
Expand Down Expand Up @@ -11772,6 +11774,13 @@ pub const AAUDIO_FORMAT_PCM_FLOAT: _bindgen_ty_50 = 2;
pub const AAUDIO_FORMAT_PCM_I24_PACKED: _bindgen_ty_50 = 3;
pub const AAUDIO_FORMAT_PCM_I32: _bindgen_ty_50 = 4;
pub const AAUDIO_FORMAT_IEC61937: _bindgen_ty_50 = 5;
pub const AAUDIO_FORMAT_MP3: _bindgen_ty_50 = 6;
pub const AAUDIO_FORMAT_AAC_LC: _bindgen_ty_50 = 7;
pub const AAUDIO_FORMAT_AAC_HE_V1: _bindgen_ty_50 = 8;
pub const AAUDIO_FORMAT_AAC_HE_V2: _bindgen_ty_50 = 9;
pub const AAUDIO_FORMAT_AAC_ELD: _bindgen_ty_50 = 10;
pub const AAUDIO_FORMAT_AAC_XHE: _bindgen_ty_50 = 11;
pub const AAUDIO_FORMAT_OPUS: _bindgen_ty_50 = 12;
pub type _bindgen_ty_50 = ::std::os::raw::c_int;
pub type aaudio_format_t = i32;
pub const AAUDIO_OK: _bindgen_ty_51 = 0;
Expand Down Expand Up @@ -11817,6 +11826,7 @@ pub type aaudio_sharing_mode_t = i32;
pub const AAUDIO_PERFORMANCE_MODE_NONE: _bindgen_ty_54 = 10;
pub const AAUDIO_PERFORMANCE_MODE_POWER_SAVING: _bindgen_ty_54 = 11;
pub const AAUDIO_PERFORMANCE_MODE_LOW_LATENCY: _bindgen_ty_54 = 12;
pub const AAUDIO_PERFORMANCE_MODE_POWER_SAVING_OFFLOADED: _bindgen_ty_54 = 13;
pub type _bindgen_ty_54 = ::std::os::raw::c_uint;
pub type aaudio_performance_mode_t = i32;
pub const AAUDIO_USAGE_MEDIA: _bindgen_ty_55 = 1;
Expand Down Expand Up @@ -12088,6 +12098,16 @@ unsafe extern "C" {
userData: *mut ::std::os::raw::c_void,
);
}
pub type AAudioStream_presentationEndCallback = ::std::option::Option<
unsafe extern "C" fn(stream: *mut AAudioStream, userData: *mut ::std::os::raw::c_void),
>;
unsafe extern "C" {
pub fn AAudioStreamBuilder_setPresentationEndCallback(
builder: *mut AAudioStreamBuilder,
callback: AAudioStream_presentationEndCallback,
userData: *mut ::std::os::raw::c_void,
);
}
unsafe extern "C" {
pub fn AAudioStreamBuilder_openStream(
builder: *mut AAudioStreamBuilder,
Expand Down Expand Up @@ -12247,6 +12267,22 @@ unsafe extern "C" {
unsafe extern "C" {
pub fn AAudioStream_getChannelMask(stream: *mut AAudioStream) -> aaudio_channel_mask_t;
}
unsafe extern "C" {
pub fn AAudioStream_setOffloadDelayPadding(
stream: *mut AAudioStream,
delayInFrames: i32,
paddingInFrames: i32,
) -> aaudio_result_t;
}
unsafe extern "C" {
pub fn AAudioStream_getOffloadDelay(stream: *mut AAudioStream) -> i32;
}
unsafe extern "C" {
pub fn AAudioStream_getOffloadPadding(stream: *mut AAudioStream) -> i32;
}
unsafe extern "C" {
pub fn AAudioStream_setOffloadEndOfStream(stream: *mut AAudioStream) -> aaudio_result_t;
}
impl media_status_t {
pub const AMEDIA_OK: media_status_t = media_status_t(0);
}
Expand Down
40 changes: 38 additions & 2 deletions ndk-sys/src/ffi_x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ pub const NL_TEXTMAX: u32 = 255;
pub const PASS_MAX: u32 = 128;
pub const LONG_BIT: u32 = 64;
pub const WORD_BIT: u32 = 32;
pub const NSIG_MAX: u32 = 65;
pub const MB_LEN_MAX: u32 = 4;
pub const NZERO: u32 = 20;
pub const IOV_MAX: u32 = 1024;
Expand Down Expand Up @@ -1107,9 +1108,9 @@ pub const SS_ONSTACK: u32 = 1;
pub const SS_DISABLE: u32 = 2;
pub const SS_AUTODISARM: u32 = 2147483648;
pub const SS_FLAG_BITS: u32 = 2147483648;
pub const _KERNEL__NSIG: u32 = 64;
pub const _NSIG: u32 = 65;
pub const NSIG: u32 = 65;
pub const _NSIG: u32 = 65;
pub const _KERNEL__NSIG: u32 = 64;
pub const SIG2STR_MAX: u32 = 32;
pub const FD_SETSIZE: u32 = 1024;
pub const F_ULOCK: u32 = 0;
Expand Down Expand Up @@ -1265,6 +1266,7 @@ pub const _SC_LEVEL3_CACHE_LINESIZE: u32 = 154;
pub const _SC_LEVEL4_CACHE_SIZE: u32 = 155;
pub const _SC_LEVEL4_CACHE_ASSOC: u32 = 156;
pub const _SC_LEVEL4_CACHE_LINESIZE: u32 = 157;
pub const _SC_NSIG: u32 = 158;
pub const STDIN_FILENO: u32 = 0;
pub const STDOUT_FILENO: u32 = 1;
pub const STDERR_FILENO: u32 = 2;
Expand Down Expand Up @@ -11812,6 +11814,13 @@ pub const AAUDIO_FORMAT_PCM_FLOAT: _bindgen_ty_50 = 2;
pub const AAUDIO_FORMAT_PCM_I24_PACKED: _bindgen_ty_50 = 3;
pub const AAUDIO_FORMAT_PCM_I32: _bindgen_ty_50 = 4;
pub const AAUDIO_FORMAT_IEC61937: _bindgen_ty_50 = 5;
pub const AAUDIO_FORMAT_MP3: _bindgen_ty_50 = 6;
pub const AAUDIO_FORMAT_AAC_LC: _bindgen_ty_50 = 7;
pub const AAUDIO_FORMAT_AAC_HE_V1: _bindgen_ty_50 = 8;
pub const AAUDIO_FORMAT_AAC_HE_V2: _bindgen_ty_50 = 9;
pub const AAUDIO_FORMAT_AAC_ELD: _bindgen_ty_50 = 10;
pub const AAUDIO_FORMAT_AAC_XHE: _bindgen_ty_50 = 11;
pub const AAUDIO_FORMAT_OPUS: _bindgen_ty_50 = 12;
pub type _bindgen_ty_50 = ::std::os::raw::c_int;
pub type aaudio_format_t = i32;
pub const AAUDIO_OK: _bindgen_ty_51 = 0;
Expand Down Expand Up @@ -11857,6 +11866,7 @@ pub type aaudio_sharing_mode_t = i32;
pub const AAUDIO_PERFORMANCE_MODE_NONE: _bindgen_ty_54 = 10;
pub const AAUDIO_PERFORMANCE_MODE_POWER_SAVING: _bindgen_ty_54 = 11;
pub const AAUDIO_PERFORMANCE_MODE_LOW_LATENCY: _bindgen_ty_54 = 12;
pub const AAUDIO_PERFORMANCE_MODE_POWER_SAVING_OFFLOADED: _bindgen_ty_54 = 13;
pub type _bindgen_ty_54 = ::std::os::raw::c_uint;
pub type aaudio_performance_mode_t = i32;
pub const AAUDIO_USAGE_MEDIA: _bindgen_ty_55 = 1;
Expand Down Expand Up @@ -12128,6 +12138,16 @@ unsafe extern "C" {
userData: *mut ::std::os::raw::c_void,
);
}
pub type AAudioStream_presentationEndCallback = ::std::option::Option<
unsafe extern "C" fn(stream: *mut AAudioStream, userData: *mut ::std::os::raw::c_void),
>;
unsafe extern "C" {
pub fn AAudioStreamBuilder_setPresentationEndCallback(
builder: *mut AAudioStreamBuilder,
callback: AAudioStream_presentationEndCallback,
userData: *mut ::std::os::raw::c_void,
);
}
unsafe extern "C" {
pub fn AAudioStreamBuilder_openStream(
builder: *mut AAudioStreamBuilder,
Expand Down Expand Up @@ -12287,6 +12307,22 @@ unsafe extern "C" {
unsafe extern "C" {
pub fn AAudioStream_getChannelMask(stream: *mut AAudioStream) -> aaudio_channel_mask_t;
}
unsafe extern "C" {
pub fn AAudioStream_setOffloadDelayPadding(
stream: *mut AAudioStream,
delayInFrames: i32,
paddingInFrames: i32,
) -> aaudio_result_t;
}
unsafe extern "C" {
pub fn AAudioStream_getOffloadDelay(stream: *mut AAudioStream) -> i32;
}
unsafe extern "C" {
pub fn AAudioStream_getOffloadPadding(stream: *mut AAudioStream) -> i32;
}
unsafe extern "C" {
pub fn AAudioStream_setOffloadEndOfStream(stream: *mut AAudioStream) -> aaudio_result_t;
}
impl media_status_t {
pub const AMEDIA_OK: media_status_t = media_status_t(0);
}
Expand Down

0 comments on commit 775f00d

Please sign in to comment.