|
| 1 | +#![allow(non_upper_case_globals)] |
| 2 | +#![allow(unexpected_cfgs)] |
| 3 | +use crate::*; |
| 4 | + |
| 5 | +// CA_PREFER_FIXED_POINT = TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST |
| 6 | +#[cfg(all( |
| 7 | + all(target_vendor = "apple", not(target_os = "macos")), |
| 8 | + not(target_env = "macabi"), |
| 9 | +))] |
| 10 | +type Inner = f32; |
| 11 | +#[cfg(not(all( |
| 12 | + all(target_vendor = "apple", not(target_os = "macos")), |
| 13 | + not(target_env = "macabi"), |
| 14 | +)))] |
| 15 | +type Inner = i32; |
| 16 | + |
| 17 | +#[allow(unused)] |
| 18 | +const kAudioUnitSampleFractionBits: AudioFormatFlags = 24; |
| 19 | + |
| 20 | +/// [Apple's documentation](https://developer.apple.com/documentation/coreaudiotypes/audiosampletype?language=objc) |
| 21 | +#[deprecated] |
| 22 | +pub type AudioSampleType = Inner; |
| 23 | + |
| 24 | +/// [Apple's documentation](https://developer.apple.com/documentation/coreaudiotypes/audiounitsampletype?language=objc) |
| 25 | +#[deprecated] |
| 26 | +pub type AudioUnitSampleType = Inner; |
| 27 | + |
| 28 | +/// [Apple's documentation](https://developer.apple.com/documentation/coreaudiotypes/kaudioformatflagscanonical?language=objc) |
| 29 | +#[cfg(all( |
| 30 | + all(target_vendor = "apple", not(target_os = "macos")), |
| 31 | + not(target_env = "macabi"), |
| 32 | +))] |
| 33 | +#[deprecated] |
| 34 | +pub const kAudioFormatFlagsCanonical: AudioFormatFlags = |
| 35 | + kAudioFormatFlagIsFloat | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked; |
| 36 | + |
| 37 | +/// [Apple's documentation](https://developer.apple.com/documentation/coreaudiotypes/kaudioformatflagsaudiounitcanonical?language=objc) |
| 38 | +#[cfg(all( |
| 39 | + all(target_vendor = "apple", not(target_os = "macos")), |
| 40 | + not(target_env = "macabi"), |
| 41 | +))] |
| 42 | +#[deprecated] |
| 43 | +pub const kAudioFormatFlagsAudioUnitCanonical: AudioFormatFlags = kAudioFormatFlagIsFloat |
| 44 | + | kAudioFormatFlagsNativeEndian |
| 45 | + | kAudioFormatFlagIsPacked |
| 46 | + | kAudioFormatFlagIsNonInterleaved; |
| 47 | + |
| 48 | +/// [Apple's documentation](https://developer.apple.com/documentation/coreaudiotypes/kaudioformatflagscanonical?language=objc) |
| 49 | +#[cfg(not(all( |
| 50 | + all(target_vendor = "apple", not(target_os = "macos")), |
| 51 | + not(target_env = "macabi"), |
| 52 | +)))] |
| 53 | +#[deprecated] |
| 54 | +pub const kAudioFormatFlagsCanonical: AudioFormatFlags = |
| 55 | + kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked; |
| 56 | + |
| 57 | +/// [Apple's documentation](https://developer.apple.com/documentation/coreaudiotypes/kaudioformatflagsaudiounitcanonical?language=objc) |
| 58 | +#[cfg(not(all( |
| 59 | + all(target_vendor = "apple", not(target_os = "macos")), |
| 60 | + not(target_env = "macabi"), |
| 61 | +)))] |
| 62 | +#[deprecated] |
| 63 | +pub const kAudioFormatFlagsAudioUnitCanonical: AudioFormatFlags = kAudioFormatFlagIsSignedInteger |
| 64 | + | kAudioFormatFlagsNativeEndian |
| 65 | + | kAudioFormatFlagIsPacked |
| 66 | + | kAudioFormatFlagIsNonInterleaved |
| 67 | + | (kAudioUnitSampleFractionBits << kLinearPCMFormatFlagsSampleFractionShift); |
0 commit comments