Class AVAssetReaderAudioMixOutput

  • All Implemented Interfaces:
    NSObject

    public class AVAssetReaderAudioMixOutput
    extends AVAssetReaderOutput
    AVAssetReaderAudioMixOutput AVAssetReaderAudioMixOutput is a concrete subclass of AVAssetReaderOutput that defines an interface for reading audio samples that result from mixing the audio from one or more AVAssetTracks of an AVAssetReader's AVAsset. Clients can read the audio data mixed from one or more asset tracks by adding an instance of AVAssetReaderAudioMixOutput to an AVAssetReader using the -[AVAssetReader addOutput:] method. API-Since: 4.1
    • Constructor Detail

      • AVAssetReaderAudioMixOutput

        protected AVAssetReaderAudioMixOutput​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • assetReaderAudioMixOutputWithAudioTracksAudioSettings

        public static AVAssetReaderAudioMixOutput assetReaderAudioMixOutputWithAudioTracksAudioSettings​(@NotNull
                                                                                                        @NotNull NSArray<? extends AVAssetTrack> audioTracks,
                                                                                                        @Nullable
                                                                                                        @Nullable NSDictionary<java.lang.String,​?> audioSettings)
        assetReaderAudioMixOutputWithAudioTracks:audioSettings: Returns an instance of AVAssetReaderAudioMixOutput for reading mixed audio from the specified audio tracks, with optional audio settings. Each track must be one of the tracks owned by the target AVAssetReader's asset and must be of media type AVMediaTypeAudio. For non-nil values of audioSettings, the audio settings dictionary must contain values for keys in AVAudioSettings.h (linear PCM only). Initialization will fail if the audio settings cannot be used with the specified tracks. AVSampleRateConverterAudioQualityKey is not supported. A value of nil for audioSettings configures the output to return samples in a convenient uncompressed format, with sample rate and other properties determined according to the properties of the specified audio tracks as well as other considerations that may vary according to device capabilities, operating system version, and other factors. Therefore if you wish to perform any processing on the output, you must examine the CMAudioFormatDescription of the CMSampleBuffers that are provided in order to ensure that your processing is appropriately configured for the output format.
        Parameters:
        tracks - An NSArray of AVAssetTrack objects from which the created object should read sample buffers to be mixed.
        audioSettings - An NSDictionary of audio settings to be used for audio output.
        Returns:
        An instance of AVAssetReaderAudioMixOutput.
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • audioMix

        @Nullable
        public @Nullable AVAudioMix audioMix()
        [@property] audioMix The audio mix used by the receiver. The value of this property is an AVAudioMix that can be used to specify how the volume of audio samples read from each source track will change over the timeline of the source asset. This property throws an exception for any of the following reasons: - an audio mix is set after reading has started (the asset reader has progressed beyond AVAssetReaderStatusUnknown) - setting an audio mix containing a track that was not used to create the receiver - an audio mix is set containing an invalid audio time pitch algorithm
      • audioSettings

        @Nullable
        public @Nullable NSDictionary<java.lang.String,​?> audioSettings()
        [@property] audioSettings The audio settings used by the receiver. The value of this property is an NSDictionary that contains values for keys from AVAudioSettings.h (linear PCM only). A value of nil indicates that the receiver will return audio samples in a convenient uncompressed format, with sample rate and other properties determined according to the properties of the receiver's audio tracks.
      • audioTimePitchAlgorithm

        @NotNull
        public @NotNull java.lang.String audioTimePitchAlgorithm()
        [@property] audioTimePitchAlgorithm Indicates the processing algorithm used to manage audio pitch for scaled audio edits. Constants for various time pitch algorithms, e.g. AVAudioTimePitchAlgorithmSpectral, are defined in AVAudioProcessingSettings.h. An NSInvalidArgumentException will be raised if this property is set to a value other than the constants defined in that file. The default value is AVAudioTimePitchAlgorithmSpectral. API-Since: 7.0
      • audioTracks

        @NotNull
        public @NotNull NSArray<? extends AVAssetTrack> audioTracks()
        [@property] audioTracks The tracks from which the receiver reads mixed audio. The value of this property is an NSArray of AVAssetTracks owned by the target AVAssetReader's asset.
      • initWithAudioTracksAudioSettings

        public AVAssetReaderAudioMixOutput initWithAudioTracksAudioSettings​(@NotNull
                                                                            @NotNull NSArray<? extends AVAssetTrack> audioTracks,
                                                                            @Nullable
                                                                            @Nullable NSDictionary<java.lang.String,​?> audioSettings)
        initWithAudioTracks:audioSettings: Creates an instance of AVAssetReaderAudioMixOutput for reading mixed audio from the specified audio tracks, with optional audio settings. Each track must be one of the tracks owned by the target AVAssetReader's asset and must be of media type AVMediaTypeAudio. For non-nil values of audioSettings, the audio settings dictionary must contain values for keys in AVAudioSettings.h (linear PCM only). Initialization will fail if the audio settings cannot be used with the specified tracks. AVSampleRateConverterAudioQualityKey is not supported. A value of nil for audioSettings configures the output to return samples in a convenient uncompressed format, with sample rate and other properties determined according to the properties of the specified audio tracks as well as other considerations that may vary according to device capabilities, operating system version, and other factors. Therefore if you wish to perform any processing on the output, you must examine the CMAudioFormatDescription of the CMSampleBuffers that are provided in order to ensure that your processing is appropriately configured for the output format. This method throws an exception for any of the following reasons: - an audio track does not have media type AVMediaTypeAudio - an audio track belongs to a different AVAsset - the audio settings contains an AVSampleRateConverterAudioQualityKey - the output would be compressed
        Parameters:
        tracks - An NSArray of AVAssetTrack objects from which the created object should read sample buffers to be mixed.
        audioSettings - An NSDictionary of audio settings to be used for audio output.
        Returns:
        An instance of AVAssetReaderAudioMixOutput.
      • setAudioMix

        public void setAudioMix​(@Nullable
                                @Nullable AVAudioMix value)
        [@property] audioMix The audio mix used by the receiver. The value of this property is an AVAudioMix that can be used to specify how the volume of audio samples read from each source track will change over the timeline of the source asset. This property throws an exception for any of the following reasons: - an audio mix is set after reading has started (the asset reader has progressed beyond AVAssetReaderStatusUnknown) - setting an audio mix containing a track that was not used to create the receiver - an audio mix is set containing an invalid audio time pitch algorithm
      • setAudioTimePitchAlgorithm

        public void setAudioTimePitchAlgorithm​(@NotNull
                                               @NotNull java.lang.String value)
        [@property] audioTimePitchAlgorithm Indicates the processing algorithm used to manage audio pitch for scaled audio edits. Constants for various time pitch algorithms, e.g. AVAudioTimePitchAlgorithmSpectral, are defined in AVAudioProcessingSettings.h. An NSInvalidArgumentException will be raised if this property is set to a value other than the constants defined in that file. The default value is AVAudioTimePitchAlgorithmSpectral. API-Since: 7.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.