Package apple.avfoundation
Class AVAudioTime
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.avfoundation.AVAudioTime
-
- All Implemented Interfaces:
NSObject
public class AVAudioTime extends NSObject
AVAudioTime Represent a moment in time. AVAudioTime is used in AVAudioEngine to represent time. Instances are immutable. A single moment in time may be represented in two different ways: 1. mach_absolute_time(), the system's basic clock. Commonly referred to as "host time." 2. audio samples at a particular sample rate A single AVAudioTime instance may contain either or both representations; it might represent only a sample time, only a host time, or both. Rationale for using host time: [a] internally we are using AudioTimeStamp, which uses host time, and it seems silly to divide [b] it is consistent with a standard system timing service [c] we do provide conveniences to convert between host ticks and seconds (host time divided by frequency) so client code wanting to do what should be straightforward time computations can at least not be cluttered by ugly multiplications and divisions by the host clock frequency.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAVAudioTime(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static AVAudioTimealloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)AudioTimeStampaudioTimeStamp()[@property] audioTimeStamp The time expressed as an AudioTimeStamp structure.static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()AVAudioTimeextrapolateTimeFromAnchor(AVAudioTime anchorTime)extrapolateTimeFromAnchor: Converts between host and sample time.static longhash_static()longhostTime()[@property] hostTime The host time.static longhostTimeForSeconds(double seconds)hostTimeForSeconds: Convert seconds to host time.AVAudioTimeinit()AVAudioTimeinitWithAudioTimeStampSampleRate(AudioTimeStamp ts, double sampleRate)initWithAudioTimeStamp:sampleRate:AVAudioTimeinitWithHostTime(long hostTime)initWithHostTime:AVAudioTimeinitWithHostTimeSampleTimeAtRate(long hostTime, long sampleTime, double sampleRate)initWithHostTime:sampleTime:atRate:AVAudioTimeinitWithSampleTimeAtRate(long sampleTime, double sampleRate)initWithSampleTime:atRate: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)booleanisHostTimeValid()[@property] hostTimeValid Whether the hostTime property is valid.booleanisSampleTimeValid()[@property] sampleTimeValid Whether the sampleTime and sampleRate properties are valid.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)doublesampleRate()[@property] sampleRate The sample rate at which sampleTime is being expressed.longsampleTime()[@property] sampleTime The time as a number of audio samples, as tracked by the current audio device.static doublesecondsForHostTime(long hostTime)secondsForHostTime: Convert host time to seconds.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()static AVAudioTimetimeWithAudioTimeStampSampleRate(AudioTimeStamp ts, double sampleRate)timeWithAudioTimeStamp:sampleRate:static AVAudioTimetimeWithHostTime(long hostTime)timeWithHostTime:static AVAudioTimetimeWithHostTimeSampleTimeAtRate(long hostTime, long sampleTime, double sampleRate)timeWithHostTime:sampleTime:atRate:static AVAudioTimetimeWithSampleTimeAtRate(long sampleTime, double sampleRate)timeWithSampleTime:atRate: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 AVAudioTime 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()
-
hostTimeForSeconds
public static long hostTimeForSeconds(double seconds)
hostTimeForSeconds: Convert seconds to host time.
-
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)
-
secondsForHostTime
public static double secondsForHostTime(long hostTime)
secondsForHostTime: Convert host time to seconds.
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
timeWithAudioTimeStampSampleRate
public static AVAudioTime timeWithAudioTimeStampSampleRate(AudioTimeStamp ts, double sampleRate)
timeWithAudioTimeStamp:sampleRate:
-
timeWithHostTime
public static AVAudioTime timeWithHostTime(long hostTime)
timeWithHostTime:
-
timeWithHostTimeSampleTimeAtRate
public static AVAudioTime timeWithHostTimeSampleTimeAtRate(long hostTime, long sampleTime, double sampleRate)
timeWithHostTime:sampleTime:atRate:
-
timeWithSampleTimeAtRate
public static AVAudioTime timeWithSampleTimeAtRate(long sampleTime, double sampleRate)
timeWithSampleTime:atRate:
-
version_static
public static long version_static()
-
audioTimeStamp
public AudioTimeStamp audioTimeStamp()
[@property] audioTimeStamp The time expressed as an AudioTimeStamp structure. This may be useful for compatibility with lower-level CoreAudio and AudioToolbox API's.
-
extrapolateTimeFromAnchor
public AVAudioTime extrapolateTimeFromAnchor(AVAudioTime anchorTime)
extrapolateTimeFromAnchor: Converts between host and sample time. If anchorTime is an AVAudioTime where both host time and sample time are valid, and self is another timestamp where only one of the two is valid, this method returns a new AVAudioTime copied from self and where any additional valid fields provided by the anchor are also valid. Note that the anchorTime must have both host and sample time valid, and self must have sample rate and at least one of host or sample time valid. Otherwise this method returns nil.// time0 has a valid audio sample representation, but no host time representation. AVAudioTime *time0 = [AVAudioTime timeWithSampleTime: 0.0 atRate: 44100.0]; // anchor has a valid host time representation and sample time representation. AVAudioTime *anchor = [player playerTimeForNodeTime: player.lastRenderTime]; // fill in valid host time representation AVAudioTime *fullTime0 = [time0 extrapolateTimeFromAnchor: anchor];
- Parameters:
anchorTime- An AVAudioTime with a more complete AudioTimeStamp than that of the receiver (self).- Returns:
- the extrapolated time
-
hostTime
public long hostTime()
[@property] hostTime The host time.
-
init
public AVAudioTime init()
-
initWithAudioTimeStampSampleRate
public AVAudioTime initWithAudioTimeStampSampleRate(AudioTimeStamp ts, double sampleRate)
initWithAudioTimeStamp:sampleRate:
-
initWithHostTime
public AVAudioTime initWithHostTime(long hostTime)
initWithHostTime:
-
initWithHostTimeSampleTimeAtRate
public AVAudioTime initWithHostTimeSampleTimeAtRate(long hostTime, long sampleTime, double sampleRate)
initWithHostTime:sampleTime:atRate:
-
initWithSampleTimeAtRate
public AVAudioTime initWithSampleTimeAtRate(long sampleTime, double sampleRate)
initWithSampleTime:atRate:
-
isHostTimeValid
public boolean isHostTimeValid()
[@property] hostTimeValid Whether the hostTime property is valid.
-
isSampleTimeValid
public boolean isSampleTimeValid()
[@property] sampleTimeValid Whether the sampleTime and sampleRate properties are valid.
-
sampleRate
public double sampleRate()
[@property] sampleRate The sample rate at which sampleTime is being expressed.
-
sampleTime
public long sampleTime()
[@property] sampleTime The time as a number of audio samples, as tracked by the current audio device.
-
-