Package apple.avfoundation
Class AVAudioConverter
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.avfoundation.AVAudioConverter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAVAudioConverter.Block_convertToBufferErrorWithInputFromBlock-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAVAudioConverter(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static AVAudioConverteralloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)NSArray<? extends NSNumber>applicableEncodeBitRates()[@property] applicableEncodeBitRates When encoding, an NSArray of NSNumber of bit rates that can be applied based on the current formats and settings.NSArray<? extends NSNumber>applicableEncodeSampleRates()[@property] applicableEncodeSampleRates When encoding, an NSArray of NSNumber of output sample rates that can be applied based on the current formats and settings.static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)NSArray<? extends NSNumber>availableEncodeBitRates()[@property] availableEncodeBitRates When encoding, an NSArray of NSNumber of all bit rates provided by the codec.NSArray<? extends NSNumber>availableEncodeChannelLayoutTags()[@property] availableEncodeChannelLayoutTags When encoding, an NSArray of NSNumber of all output channel layout tags provided by the codec.NSArray<? extends NSNumber>availableEncodeSampleRates()[@property] availableEncodeSampleRates When encoding, an NSArray of NSNumber of all output sample rates provided by the codec.longbitRate()[@property] bitRate bitRate in bits per second.java.lang.StringbitRateStrategy()[@property] bitRateStrategy When encoding, an AVEncoderBitRateStrategyKey value constant as defined in AVAudioSettings.h.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)NSArray<? extends NSNumber>channelMap()[@property] channelMap An array of integers indicating from which input to derive each output.static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()longconvertToBufferErrorWithInputFromBlock(AVAudioBuffer outputBuffer, org.moe.natj.general.ptr.Ptr<NSError> outError, AVAudioConverter.Block_convertToBufferErrorWithInputFromBlock inputBlock)convertToBuffer:error:withInputFromBlock: Perform any supported conversion.booleanconvertToBufferFromBufferError(AVAudioPCMBuffer outputBuffer, AVAudioPCMBuffer inputBuffer, org.moe.natj.general.ptr.Ptr<NSError> outError)convertToBuffer:fromBuffer:error: Perform a simple conversion.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()booleandither()[@property] dither Setting YES will turn on dither, if dither makes sense in given the current formats and settings.booleandownmix()[@property] downmix If YES and channel remapping is necessary, then channels will be mixed as appropriate instead of remapped.static longhash_static()AVAudioConverterinit()AVAudioConverterinitFromFormatToFormat(AVAudioFormat fromFormat, AVAudioFormat toFormat)initFromFormat:toFormat: Initialize from input and output formats.AVAudioFormatinputFormat()[@property] inputFormat The format of the input audio stream.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)NSDatamagicCookie()[@property] magicCookie Decoders require some data in the form of a magicCookie in order to decode properly.longmaximumOutputPacketSize()[@property] maximumOutputPacketSize The maximum size of an output packet, in bytes.static java.lang.Objectnew_objc()AVAudioFormatoutputFormat()[@property] outputFormat The format of the output audio stream.AVAudioConverterPrimeInfoprimeInfo()[@property] primeInfo Indicates the the number of priming frames.longprimeMethod()[@property] primeMethod Indicates the priming method to be used by the sample rate converter or decoder.voidreset()reset Resets the converter so that a new stream may be converted.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)java.lang.StringsampleRateConverterAlgorithm()[@property] sampleRateConverterAlgorithm An AVSampleRateConverterAlgorithmKey value as defined in AVAudioSettings.h.longsampleRateConverterQuality()[@property] sampleRateConverterQuality An AVAudioQuality value as defined in AVAudioSettings.h.voidsetBitRate(long value)[@property] bitRate bitRate in bits per second.voidsetBitRateStrategy(java.lang.String value)[@property] bitRateStrategy When encoding, an AVEncoderBitRateStrategyKey value constant as defined in AVAudioSettings.h.voidsetChannelMap(NSArray<? extends NSNumber> value)[@property] channelMap An array of integers indicating from which input to derive each output.voidsetDither(boolean value)[@property] dither Setting YES will turn on dither, if dither makes sense in given the current formats and settings.voidsetDownmix(boolean value)[@property] downmix If YES and channel remapping is necessary, then channels will be mixed as appropriate instead of remapped.voidsetMagicCookie(NSData value)[@property] magicCookie Decoders require some data in the form of a magicCookie in order to decode properly.voidsetPrimeInfo(AVAudioConverterPrimeInfo value)[@property] primeInfo Indicates the the number of priming frames.voidsetPrimeMethod(long value)[@property] primeMethod Indicates the priming method to be used by the sample rate converter or decoder.voidsetSampleRateConverterAlgorithm(java.lang.String value)[@property] sampleRateConverterAlgorithm An AVSampleRateConverterAlgorithmKey value as defined in AVAudioSettings.h.voidsetSampleRateConverterQuality(long value)[@property] sampleRateConverterQuality An AVAudioQuality value as defined in AVAudioSettings.h.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static AVAudioConverter alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static 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()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
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
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
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()
-
applicableEncodeBitRates
public NSArray<? extends NSNumber> applicableEncodeBitRates()
[@property] applicableEncodeBitRates When encoding, an NSArray of NSNumber of bit rates that can be applied based on the current formats and settings. Returns nil if not encoding.
-
applicableEncodeSampleRates
public NSArray<? extends NSNumber> applicableEncodeSampleRates()
[@property] applicableEncodeSampleRates When encoding, an NSArray of NSNumber of output sample rates that can be applied based on the current formats and settings. Returns nil if not encoding.
-
availableEncodeBitRates
public NSArray<? extends NSNumber> availableEncodeBitRates()
[@property] availableEncodeBitRates When encoding, an NSArray of NSNumber of all bit rates provided by the codec. Returns nil if not encoding.
-
availableEncodeChannelLayoutTags
public NSArray<? extends NSNumber> availableEncodeChannelLayoutTags()
[@property] availableEncodeChannelLayoutTags When encoding, an NSArray of NSNumber of all output channel layout tags provided by the codec. Returns nil if not encoding.
-
availableEncodeSampleRates
public NSArray<? extends NSNumber> availableEncodeSampleRates()
[@property] availableEncodeSampleRates When encoding, an NSArray of NSNumber of all output sample rates provided by the codec. Returns nil if not encoding.
-
bitRate
public long bitRate()
[@property] bitRate bitRate in bits per second. Only applies when encoding.
-
bitRateStrategy
public java.lang.String bitRateStrategy()
[@property] bitRateStrategy When encoding, an AVEncoderBitRateStrategyKey value constant as defined in AVAudioSettings.h. Returns nil if not encoding.
-
channelMap
public NSArray<? extends NSNumber> channelMap()
[@property] channelMap An array of integers indicating from which input to derive each output. The array has size equal to the number of output channels. Each element's value is the input channel number, starting with zero, that is to be copied to that output. A negative value means that the output channel will have no source and will be silent. Setting a channel map overrides channel mapping due to any channel layouts in the input and output formats that may have been supplied.
-
convertToBufferErrorWithInputFromBlock
public long convertToBufferErrorWithInputFromBlock(AVAudioBuffer outputBuffer, org.moe.natj.general.ptr.Ptr<NSError> outError, AVAudioConverter.Block_convertToBufferErrorWithInputFromBlock inputBlock)
convertToBuffer:error:withInputFromBlock: Perform any supported conversion. It attempts to fill the buffer to its capacity. On return, the buffer's length indicates the number of sample frames successfully converted.- Parameters:
inputBlock- A block which will be called to get input data as needed. See description for AVAudioConverterInputBlock.outputBuffer- The output buffer.outError- An error if the conversion fails.- Returns:
- An AVAudioConverterOutputStatus is returned.
-
convertToBufferFromBufferError
public boolean convertToBufferFromBufferError(AVAudioPCMBuffer outputBuffer, AVAudioPCMBuffer inputBuffer, org.moe.natj.general.ptr.Ptr<NSError> outError)
convertToBuffer:fromBuffer:error: Perform a simple conversion. That is, a conversion which does not involve codecs or sample rate conversion. The output buffer's frameCapacity should be at least at large as the inputBuffer's frameLength. If the conversion involves a codec or sample rate conversion, you instead must use convertToBuffer:error:withInputFromBlock:.- Parameters:
inputBuffer- The input buffer.outputBuffer- The output buffer.outError- An error if the conversion fails.- Returns:
- YES is returned on success, NO when an error has occurred.
-
dither
public boolean dither()
[@property] dither Setting YES will turn on dither, if dither makes sense in given the current formats and settings. Default value is NO.
-
downmix
public boolean downmix()
[@property] downmix If YES and channel remapping is necessary, then channels will be mixed as appropriate instead of remapped. Default value is NO.
-
init
public AVAudioConverter init()
-
initFromFormatToFormat
public AVAudioConverter initFromFormatToFormat(AVAudioFormat fromFormat, AVAudioFormat toFormat)
initFromFormat:toFormat: Initialize from input and output formats. Returns nil if the format conversion is not possible.- Parameters:
fromFormat- The input format.toFormat- The output format.
-
inputFormat
public AVAudioFormat inputFormat()
[@property] inputFormat The format of the input audio stream. (NB. AVAudioFormat includes the channel layout)
-
magicCookie
public NSData magicCookie()
[@property] magicCookie Decoders require some data in the form of a magicCookie in order to decode properly. Encoders will produce a magicCookie.
-
maximumOutputPacketSize
public long maximumOutputPacketSize()
[@property] maximumOutputPacketSize The maximum size of an output packet, in bytes. When encoding it is useful to know how large a packet can be in order to allocate a buffer to receive the output.
-
outputFormat
public AVAudioFormat outputFormat()
[@property] outputFormat The format of the output audio stream. (NB. AVAudioFormat includes the channel layout)
-
primeInfo
public AVAudioConverterPrimeInfo primeInfo()
[@property] primeInfo Indicates the the number of priming frames.
-
primeMethod
public long primeMethod()
[@property] primeMethod Indicates the priming method to be used by the sample rate converter or decoder.
-
reset
public void reset()
reset Resets the converter so that a new stream may be converted.
-
sampleRateConverterAlgorithm
public java.lang.String sampleRateConverterAlgorithm()
[@property] sampleRateConverterAlgorithm An AVSampleRateConverterAlgorithmKey value as defined in AVAudioSettings.h.
-
sampleRateConverterQuality
public long sampleRateConverterQuality()
[@property] sampleRateConverterQuality An AVAudioQuality value as defined in AVAudioSettings.h.
-
setBitRate
public void setBitRate(long value)
[@property] bitRate bitRate in bits per second. Only applies when encoding.
-
setBitRateStrategy
public void setBitRateStrategy(java.lang.String value)
[@property] bitRateStrategy When encoding, an AVEncoderBitRateStrategyKey value constant as defined in AVAudioSettings.h. Returns nil if not encoding.
-
setChannelMap
public void setChannelMap(NSArray<? extends NSNumber> value)
[@property] channelMap An array of integers indicating from which input to derive each output. The array has size equal to the number of output channels. Each element's value is the input channel number, starting with zero, that is to be copied to that output. A negative value means that the output channel will have no source and will be silent. Setting a channel map overrides channel mapping due to any channel layouts in the input and output formats that may have been supplied.
-
setDither
public void setDither(boolean value)
[@property] dither Setting YES will turn on dither, if dither makes sense in given the current formats and settings. Default value is NO.
-
setDownmix
public void setDownmix(boolean value)
[@property] downmix If YES and channel remapping is necessary, then channels will be mixed as appropriate instead of remapped. Default value is NO.
-
setMagicCookie
public void setMagicCookie(NSData value)
[@property] magicCookie Decoders require some data in the form of a magicCookie in order to decode properly. Encoders will produce a magicCookie.
-
setPrimeInfo
public void setPrimeInfo(AVAudioConverterPrimeInfo value)
[@property] primeInfo Indicates the the number of priming frames.
-
setPrimeMethod
public void setPrimeMethod(long value)
[@property] primeMethod Indicates the priming method to be used by the sample rate converter or decoder.
-
setSampleRateConverterAlgorithm
public void setSampleRateConverterAlgorithm(java.lang.String value)
[@property] sampleRateConverterAlgorithm An AVSampleRateConverterAlgorithmKey value as defined in AVAudioSettings.h.
-
setSampleRateConverterQuality
public void setSampleRateConverterQuality(long value)
[@property] sampleRateConverterQuality An AVAudioQuality value as defined in AVAudioSettings.h.
-
-