use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-media")]
use objc2_core_media::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-media-toolbox")]
#[cfg(not(target_os = "watchos"))]
use objc2_media_toolbox::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AVAudioMix;
);
extern_conformance!(
unsafe impl NSCopying for AVAudioMix {}
);
unsafe impl CopyingHelper for AVAudioMix {
type Result = Self;
}
extern_conformance!(
unsafe impl NSMutableCopying for AVAudioMix {}
);
unsafe impl MutableCopyingHelper for AVAudioMix {
type Result = AVMutableAudioMix;
}
extern_conformance!(
unsafe impl NSObjectProtocol for AVAudioMix {}
);
impl AVAudioMix {
extern_methods!(
#[unsafe(method(inputParameters))]
#[unsafe(method_family = none)]
pub unsafe fn inputParameters(&self) -> Retained<NSArray<AVAudioMixInputParameters>>;
);
}
impl AVAudioMix {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(AVAudioMix, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AVMutableAudioMix;
);
extern_conformance!(
unsafe impl NSCopying for AVMutableAudioMix {}
);
unsafe impl CopyingHelper for AVMutableAudioMix {
type Result = AVAudioMix;
}
extern_conformance!(
unsafe impl NSMutableCopying for AVMutableAudioMix {}
);
unsafe impl MutableCopyingHelper for AVMutableAudioMix {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for AVMutableAudioMix {}
);
impl AVMutableAudioMix {
extern_methods!(
#[unsafe(method(audioMix))]
#[unsafe(method_family = none)]
pub unsafe fn audioMix() -> Retained<Self>;
#[unsafe(method(inputParameters))]
#[unsafe(method_family = none)]
pub unsafe fn inputParameters(&self) -> Retained<NSArray<AVAudioMixInputParameters>>;
#[unsafe(method(setInputParameters:))]
#[unsafe(method_family = none)]
pub unsafe fn setInputParameters(
&self,
input_parameters: &NSArray<AVAudioMixInputParameters>,
);
);
}
impl AVMutableAudioMix {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AVAudioMixInputParameters;
);
extern_conformance!(
unsafe impl NSCopying for AVAudioMixInputParameters {}
);
unsafe impl CopyingHelper for AVAudioMixInputParameters {
type Result = Self;
}
extern_conformance!(
unsafe impl NSMutableCopying for AVAudioMixInputParameters {}
);
unsafe impl MutableCopyingHelper for AVAudioMixInputParameters {
type Result = AVMutableAudioMixInputParameters;
}
extern_conformance!(
unsafe impl NSObjectProtocol for AVAudioMixInputParameters {}
);
impl AVAudioMixInputParameters {
extern_methods!(
#[cfg(feature = "objc2-core-media")]
#[unsafe(method(trackID))]
#[unsafe(method_family = none)]
pub unsafe fn trackID(&self) -> CMPersistentTrackID;
#[cfg(feature = "AVAudioProcessingSettings")]
#[unsafe(method(audioTimePitchAlgorithm))]
#[unsafe(method_family = none)]
pub unsafe fn audioTimePitchAlgorithm(&self)
-> Option<Retained<AVAudioTimePitchAlgorithm>>;
#[cfg(feature = "objc2-media-toolbox")]
#[cfg(not(target_os = "watchos"))]
#[unsafe(method(audioTapProcessor))]
#[unsafe(method_family = none)]
pub unsafe fn audioTapProcessor(&self) -> Option<Retained<MTAudioProcessingTap>>;
#[cfg(feature = "objc2-core-media")]
#[unsafe(method(getVolumeRampForTime:startVolume:endVolume:timeRange:))]
#[unsafe(method_family = none)]
pub unsafe fn getVolumeRampForTime_startVolume_endVolume_timeRange(
&self,
time: CMTime,
start_volume: *mut c_float,
end_volume: *mut c_float,
time_range: *mut CMTimeRange,
) -> bool;
);
}
impl AVAudioMixInputParameters {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(AVAudioMixInputParameters, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AVMutableAudioMixInputParameters;
);
extern_conformance!(
unsafe impl NSCopying for AVMutableAudioMixInputParameters {}
);
unsafe impl CopyingHelper for AVMutableAudioMixInputParameters {
type Result = AVAudioMixInputParameters;
}
extern_conformance!(
unsafe impl NSMutableCopying for AVMutableAudioMixInputParameters {}
);
unsafe impl MutableCopyingHelper for AVMutableAudioMixInputParameters {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for AVMutableAudioMixInputParameters {}
);
impl AVMutableAudioMixInputParameters {
extern_methods!(
#[cfg(feature = "AVAssetTrack")]
#[unsafe(method(audioMixInputParametersWithTrack:))]
#[unsafe(method_family = none)]
pub unsafe fn audioMixInputParametersWithTrack(
track: Option<&AVAssetTrack>,
) -> Retained<Self>;
#[unsafe(method(audioMixInputParameters))]
#[unsafe(method_family = none)]
pub unsafe fn audioMixInputParameters() -> Retained<Self>;
#[cfg(feature = "objc2-core-media")]
#[unsafe(method(trackID))]
#[unsafe(method_family = none)]
pub unsafe fn trackID(&self) -> CMPersistentTrackID;
#[cfg(feature = "objc2-core-media")]
#[unsafe(method(setTrackID:))]
#[unsafe(method_family = none)]
pub unsafe fn setTrackID(&self, track_id: CMPersistentTrackID);
#[cfg(feature = "AVAudioProcessingSettings")]
#[unsafe(method(audioTimePitchAlgorithm))]
#[unsafe(method_family = none)]
pub unsafe fn audioTimePitchAlgorithm(&self)
-> Option<Retained<AVAudioTimePitchAlgorithm>>;
#[cfg(feature = "AVAudioProcessingSettings")]
#[unsafe(method(setAudioTimePitchAlgorithm:))]
#[unsafe(method_family = none)]
pub unsafe fn setAudioTimePitchAlgorithm(
&self,
audio_time_pitch_algorithm: Option<&AVAudioTimePitchAlgorithm>,
);
#[cfg(feature = "objc2-media-toolbox")]
#[cfg(not(target_os = "watchos"))]
#[unsafe(method(audioTapProcessor))]
#[unsafe(method_family = none)]
pub unsafe fn audioTapProcessor(&self) -> Option<Retained<MTAudioProcessingTap>>;
#[cfg(feature = "objc2-media-toolbox")]
#[cfg(not(target_os = "watchos"))]
#[unsafe(method(setAudioTapProcessor:))]
#[unsafe(method_family = none)]
pub unsafe fn setAudioTapProcessor(
&self,
audio_tap_processor: Option<&MTAudioProcessingTap>,
);
#[cfg(feature = "objc2-core-media")]
#[unsafe(method(setVolumeRampFromStartVolume:toEndVolume:timeRange:))]
#[unsafe(method_family = none)]
pub unsafe fn setVolumeRampFromStartVolume_toEndVolume_timeRange(
&self,
start_volume: c_float,
end_volume: c_float,
time_range: CMTimeRange,
);
#[cfg(feature = "objc2-core-media")]
#[unsafe(method(setVolume:atTime:))]
#[unsafe(method_family = none)]
pub unsafe fn setVolume_atTime(&self, volume: c_float, time: CMTime);
);
}
impl AVMutableAudioMixInputParameters {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}