public class AVAudioFormat extends NSObject implements NSSecureCoding
A representation of an audio format.
AVAudioFormat wraps a Core Audio AudioStreamBasicDescription struct, with convenience initializers and accessors for common formats, including Core Audio's standard deinterleaved 32-bit floating point.
Instances of this class are immutable.
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
AVAudioFormat(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
_supportsSecureCoding()
This property must return YES on all classes that allow secure coding.
|
static boolean |
accessInstanceVariablesDirectly() |
static AVAudioFormat |
alloc() |
static AVAudioFormat |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
int |
channelCount()
[@property] channelCount
|
AVAudioChannelLayout |
channelLayout()
[@property] channelLayout
|
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
long |
commonFormat()
[@property] commonFormat
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
void |
encodeWithCoder(NSCoder coder) |
CMFormatDescriptionRef |
formatDescription()
[@property] formatDescription
|
static long |
hash_static() |
AVAudioFormat |
init() |
AVAudioFormat |
initStandardFormatWithSampleRateChannelLayout(double sampleRate,
AVAudioChannelLayout layout)
initStandardFormatWithSampleRate:channelLayout:
|
AVAudioFormat |
initStandardFormatWithSampleRateChannels(double sampleRate,
int channels)
initStandardFormatWithSampleRate:channels:
|
AVAudioFormat |
initWithCMAudioFormatDescription(CMFormatDescriptionRef formatDescription)
initWithCMAudioFormatDescription:
|
AVAudioFormat |
initWithCoder(NSCoder coder)
NS_DESIGNATED_INITIALIZER
|
AVAudioFormat |
initWithCommonFormatSampleRateChannelsInterleaved(long format,
double sampleRate,
int channels,
boolean interleaved)
initWithCommonFormat:sampleRate:channels:interleaved:
|
AVAudioFormat |
initWithCommonFormatSampleRateInterleavedChannelLayout(long format,
double sampleRate,
boolean interleaved,
AVAudioChannelLayout layout)
initWithCommonFormat:sampleRate:interleaved:channelLayout:
|
AVAudioFormat |
initWithSettings(NSDictionary<java.lang.String,?> settings)
initWithSettings:
|
AVAudioFormat |
initWithStreamDescription(AudioStreamBasicDescription asbd)
initWithStreamDescription:
|
AVAudioFormat |
initWithStreamDescriptionChannelLayout(AudioStreamBasicDescription asbd,
AVAudioChannelLayout layout)
initWithStreamDescription:channelLayout:
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isEqual(java.lang.Object object)
isEqual:
|
boolean |
isInterleaved()
[@property] interleaved
|
boolean |
isStandard()
[@property] standard
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
NSData |
magicCookie()
[@property] magicCookie
|
static AVAudioFormat |
new_objc() |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
double |
sampleRate()
[@property] sampleRate
|
void |
setMagicCookie(NSData value)
[@property] magicCookie
|
NSDictionary<java.lang.String,?> |
settings()
[@property] settings
|
static void |
setVersion_static(long aVersion) |
AudioStreamBasicDescription |
streamDescription()
[@property] streamDescription
|
static org.moe.natj.objc.Class |
superclass_static() |
static boolean |
supportsSecureCoding() |
static long |
version_static() |
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, 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, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static AVAudioFormat alloc()
public static AVAudioFormat allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public int channelCount()
The number of channels of audio data.
public AVAudioChannelLayout channelLayout()
The underlying AVAudioChannelLayout, if any.
Only formats with more than 2 channels are required to have channel layouts.
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public long commonFormat()
An `AVAudioCommonFormat` identifying the format
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public void encodeWithCoder(NSCoder coder)
encodeWithCoder in interface NSCodingpublic CMFormatDescriptionRef formatDescription()
Converts to a CMAudioFormatDescriptionRef, for use with Core Media API's.
public static long hash_static()
public AVAudioFormat init()
public AVAudioFormat initStandardFormatWithSampleRateChannelLayout(double sampleRate, AVAudioChannelLayout layout)
Initialize to deinterleaved float with the specified sample rate and channel layout.
sampleRate - the sample ratelayout - the channel layout. must not be nil.public AVAudioFormat initStandardFormatWithSampleRateChannels(double sampleRate, int channels)
Initialize to deinterleaved float with the specified sample rate and channel count.
If the format specifies more than 2 channels, this method fails (returns nil).
sampleRate - the sample ratechannels - the channel countpublic AVAudioFormat initWithCMAudioFormatDescription(CMFormatDescriptionRef formatDescription)
initialize from a CMAudioFormatDescriptionRef.
If formatDescription is invalid, this method fails (returns nil).
formatDescription - the CMAudioFormatDescriptionRef.public AVAudioFormat initWithCoder(NSCoder coder)
NSCodinginitWithCoder in interface NSCodingpublic AVAudioFormat initWithCommonFormatSampleRateChannelsInterleaved(long format, double sampleRate, int channels, boolean interleaved)
Initialize to float with the specified sample rate, channel count and interleavedness.
If the format specifies more than 2 channels, this method fails (returns nil).
format - the common format typesampleRate - the sample ratechannels - the channel countinterleaved - true if interleavedpublic AVAudioFormat initWithCommonFormatSampleRateInterleavedChannelLayout(long format, double sampleRate, boolean interleaved, AVAudioChannelLayout layout)
Initialize to float with the specified sample rate, channel layout and interleavedness.
format - the common format typesampleRate - the sample rateinterleaved - true if interleavedlayout - the channel layout. must not be nil.public AVAudioFormat initWithSettings(NSDictionary<java.lang.String,?> settings)
Initialize using a settings dictionary.
See AVAudioSettings.h. Note that many settings dictionary elements pertain to encoder settings, not the basic format, and will be ignored.
Returns nil if a format cannot be constructed with the provided settings, e.g. when: - AVNumberOfChannelsKey specifies more than 2 channels, but AVChannelLayoutKey hasn't been specified or the layout does not match - AVLinearPCMBitDepthKey for linear PCM format specifies less than 8 or greater than 32 bits - values for the keys are not of the expected types
public AVAudioFormat initWithStreamDescription(AudioStreamBasicDescription asbd)
Initialize from an AudioStreamBasicDescription.
If the format specifies more than 2 channels, this method fails (returns nil).
asbd - the AudioStreamBasicDescriptionpublic AVAudioFormat initWithStreamDescriptionChannelLayout(AudioStreamBasicDescription asbd, AVAudioChannelLayout layout)
Initialize from an AudioStreamBasicDescription and optional channel layout.
If the format specifies more than 2 channels, this method fails (returns nil) unless layout is non-nil.
asbd - the AudioStreamBasicDescriptionlayout - the channel layout. Can be nil only if asbd specifies 1 or 2 channels.public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public boolean isEqual(java.lang.Object object)
Determine whether another format is functionally equivalent.
For PCM, interleavedness is ignored for mono. Differences in the AudioStreamBasicDescription alignment and packedness are ignored when they are not significant (e.g. with 1 channel, 2 bytes per frame and 16 bits per channel, neither alignment, the format is implicitly packed and can be interpreted as either high- or low-aligned.) For AVAudioChannelLayout, a layout with standard mono/stereo tag is considered to be equivalent to a nil layout. Otherwise, the layouts are compared for equality.
public boolean isInterleaved()
Describes whether the samples are interleaved.
For non-PCM formats, the value is undefined.
public boolean isStandard()
Describes whether the format is deinterleaved native-endian float.
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public NSData magicCookie()
The underlying magic cookie, if any.
A magic cookie contains metadata associated with encoders and decoders. Encoders produce a magic cookie, and some decoders require a magic cookie to decode properly.
public static AVAudioFormat new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public double sampleRate()
A sampling rate in Hertz.
public void setMagicCookie(NSData value)
The underlying magic cookie, if any.
A magic cookie contains metadata associated with encoders and decoders. Encoders produce a magic cookie, and some decoders require a magic cookie to decode properly.
public static void setVersion_static(long aVersion)
public NSDictionary<java.lang.String,?> settings()
Returns the format represented as a dictionary with keys from AVAudioSettings.h.
public AudioStreamBasicDescription streamDescription()
Returns the AudioStreamBasicDescription, for use with lower-level audio API's.
public static org.moe.natj.objc.Class superclass_static()
public static boolean supportsSecureCoding()
public boolean _supportsSecureCoding()
NSSecureCoding_supportsSecureCoding in interface NSSecureCodingpublic static long version_static()