Package apple.avfoundation
Class AVAudioNode
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.avfoundation.AVAudioNode
-
- All Implemented Interfaces:
NSObject
- Direct Known Subclasses:
AVAudioEnvironmentNode,AVAudioIONode,AVAudioMixerNode,AVAudioPlayerNode,AVAudioSinkNode,AVAudioSourceNode,AVAudioUnit
public class AVAudioNode extends NSObject
AVAudioNode Base class for an audio generation, processing, or I/O block. `AVAudioEngine` objects contain instances of various AVAudioNode subclasses. This base class provides certain common functionality. Nodes have input and output busses, which can be thought of as connection points. For example, an effect typically has one input bus and one output bus. A mixer typically has multiple input busses and one output bus. Busses have formats, expressed in terms of sample rate and channel count. When making connections between nodes, often the format must match exactly. There are exceptions (e.g. `AVAudioMixerNode` and `AVAudioOutputNode`). Nodes do not currently provide useful functionality until attached to an engine.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAVAudioNode.Block_installTapOnBusBufferSizeFormatBlock-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAVAudioNode(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static AVAudioNodealloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)AUAudioUnitAUAudioUnit()[@property] AUAudioUnit An AUAudioUnit wrapping or underlying the implementation's AudioUnit.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()AVAudioEngineengine()[@property] engine The engine to which the node is attached (or nil).static longhash_static()AVAudioNodeinit()AVAudioFormatinputFormatForBus(long bus)inputFormatForBus: Obtain an input bus's format.voidinstallTapOnBusBufferSizeFormatBlock(long bus, int bufferSize, AVAudioFormat format, AVAudioNode.Block_installTapOnBusBufferSizeFormatBlock tapBlock)installTapOnBus:bufferSize:format:block: Create a "tap" to record/monitor/observe the output of the node.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)AVAudioTimelastRenderTime()[@property] lastRenderTime Obtain the time for which the node most recently rendered.doublelatency()[@property] latency The processing latency of the node, in seconds.java.lang.StringnameForInputBus(long bus)nameForInputBus: Return the name of an input bus.java.lang.StringnameForOutputBus(long bus)nameForOutputBus: Return the name of an output bus.static java.lang.Objectnew_objc()longnumberOfInputs()[@property] numberOfInputs The node's number of input busses.longnumberOfOutputs()[@property] numberOfOutputs The node's number of output busses.AVAudioFormatoutputFormatForBus(long bus)outputFormatForBus: Obtain an output bus's format.doubleoutputPresentationLatency()[@property] outputPresentationLatency The maximum render pipeline latency downstream of the node, in seconds.voidremoveTapOnBus(long bus)removeTapOnBus: Destroy a tap.voidreset()reset Clear a unit's previous processing state.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)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 AVAudioNode 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()
-
engine
public AVAudioEngine engine()
[@property] engine The engine to which the node is attached (or nil).
-
init
public AVAudioNode init()
-
inputFormatForBus
public AVAudioFormat inputFormatForBus(long bus)
inputFormatForBus: Obtain an input bus's format.
-
installTapOnBusBufferSizeFormatBlock
public void installTapOnBusBufferSizeFormatBlock(long bus, int bufferSize, AVAudioFormat format, AVAudioNode.Block_installTapOnBusBufferSizeFormatBlock tapBlock)installTapOnBus:bufferSize:format:block: Create a "tap" to record/monitor/observe the output of the node. Only one tap may be installed on any bus. Taps may be safely installed and removed while the engine is running. Note that if you have a tap installed on AVAudioOutputNode, there could be a mismatch between the tap buffer format and AVAudioOutputNode's output format, depending on the underlying physical device. Hence, instead of tapping the AVAudioOutputNode, it is advised to tap the node connected to it. E.g. to capture audio from input node:AVAudioEngine *engine = [[AVAudioEngine alloc] init]; AVAudioInputNode *input = [engine inputNode]; AVAudioFormat *format = [input outputFormatForBus: 0]; [input installTapOnBus: 0 bufferSize: 8192 format: format block: ^(AVAudioPCMBuffer *buf, AVAudioTime *when) { // ‘buf' contains audio captured from input node at time 'when' }]; .... // start engine- Parameters:
bus- the node output bus to which to attach the tapbufferSize- the requested size of the incoming buffers in sample frames. Supported range is [100, 400] ms.format- If non-nil, attempts to apply this as the format of the specified output bus. This should only be done when attaching to an output bus which is not connected to another node; an error will result otherwise. The tap and connection formats (if non-nil) on the specified bus should be identical. Otherwise, the latter operation will override any previously set format.tapBlock- a block to be called with audio buffers
-
lastRenderTime
public AVAudioTime lastRenderTime()
[@property] lastRenderTime Obtain the time for which the node most recently rendered. Will return nil if the engine is not running or if the node is not connected to an input or output node.
-
nameForInputBus
public java.lang.String nameForInputBus(long bus)
nameForInputBus: Return the name of an input bus.
-
nameForOutputBus
public java.lang.String nameForOutputBus(long bus)
nameForOutputBus: Return the name of an output bus.
-
numberOfInputs
public long numberOfInputs()
[@property] numberOfInputs The node's number of input busses.
-
numberOfOutputs
public long numberOfOutputs()
[@property] numberOfOutputs The node's number of output busses.
-
outputFormatForBus
public AVAudioFormat outputFormatForBus(long bus)
outputFormatForBus: Obtain an output bus's format.
-
removeTapOnBus
public void removeTapOnBus(long bus)
removeTapOnBus: Destroy a tap.- Parameters:
bus- the node output bus whose tap is to be destroyed
-
reset
public void reset()
reset Clear a unit's previous processing state.
-
AUAudioUnit
public AUAudioUnit AUAudioUnit()
[@property] AUAudioUnit An AUAudioUnit wrapping or underlying the implementation's AudioUnit. This provides an AUAudioUnit which either wraps or underlies the implementation's AudioUnit, depending on how that audio unit is packaged. Applications can interact with this AUAudioUnit to control custom properties, select presets, change parameters, etc. No operations that may conflict with state maintained by the engine should be performed directly on the audio unit. These include changing initialization state, stream formats, channel layouts or connections to other audio units.
-
latency
public double latency()
[@property] latency The processing latency of the node, in seconds. This property reflects the delay between when an impulse in the audio stream arrives at the input vs. output of the node. This should reflect the delay due to signal processing (e.g. filters, FFT's, etc.), not delay or reverberation which is being applied as an effect. A value of zero indicates either no latency or an unknown latency.
-
outputPresentationLatency
public double outputPresentationLatency()
[@property] outputPresentationLatency The maximum render pipeline latency downstream of the node, in seconds. This describes the maximum time it will take for the audio at the output of a node to be presented. For instance, the output presentation latency of the output node in the engine is: - zero in manual rendering mode - the presentation latency of the device itself when rendering to an audio device (see `AVAudioIONode(presentationLatency)`) The output presentation latency of a node connected directly to the output node is the output node's presentation latency plus the output node's processing latency (see `latency`). For a node which is exclusively in the input node chain (i.e. not connected to engine's output node), this property reflects the latency for the output of this node to be presented at the output of the terminating node in the input chain. A value of zero indicates either an unknown or no latency. Note that this latency value can change as the engine is reconfigured (started/stopped, connections made/altered downstream of this node etc.). So it is recommended not to cache this value and fetch it whenever it's needed.
-
-