iOS Developer Library

Developer

AudioToolbox Framework Reference Audio Unit Processing Graph Services Reference

Options
Deployment Target:

On This Page
Language:

Audio Unit Processing Graph Services Reference

Audio Unit Processing Graph Services provide interfaces for representing a set of audio units, connections between their inputs and outputs, and callbacks used to provide inputs. It also enables the embedding of sub (or child) processing graphs within parent graphs to allow for a logical organization of parts of an overall signal chain.

An audio processing graph object (of type AUGraph) is a complete description of an audio signal processing network. Audio Unit Processing Graph Services may manage the instantiated audio units if the AUGraphOpen function is called.

An audio processing graph object may be introspected to get complete information about all of the audio units in the graph. The various node objects (each of type AUNode) in the graph, each representing an audio unit or a sub graph, may be added or removed, and the interactions between them modified.

A graph object’s state can be manipulated in both the rendering thread and in other threads. Consequently, any activities that affect the state of the graph are guarded with locks and a messaging model between any calling thread and the thread upon which the graph object’s output unit is called (the render thread).

A graph object will have a single head node––an output unit. The output unit is used to both start and stop the rendering operations of a graph, and is the dispatch point for the safe manipulation of the state of the graph while it is running.

Functions

  • Adds a node to an audio processing graph.

    Declaration

    Swift

    func AUGraphAddNode(_ inGraph: AUGraph, _ inDescription: UnsafePointer<AudioComponentDescription>, _ outNode: UnsafeMutablePointer<AUNode>) -> OSStatus

    Objective-C

    OSStatus AUGraphAddNode ( AUGraph inGraph, const AudioComponentDescription *inDescription, AUNode *outNode );

    Parameters

    inGraph

    The AUGraph object that you are adding a node to.

    inDescription

    The AudioComponentDescription object used to find and open the audio unit that you are adding as a new node.

    outNode

    The newly added node.

    Return Value

    A result code.

    Discussion

    Creates a node in an audio processing graph, using the supplied AudioComponentDescription object to find and open the audio unit for the node.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Adds a render notification callback to an audio processing graph.

    Declaration

    Swift

    func AUGraphAddRenderNotify(_ inGraph: AUGraph, _ inCallback: AURenderCallback, _ inRefCon: UnsafeMutablePointer<Void>) -> OSStatus

    Objective-C

    OSStatus AUGraphAddRenderNotify ( AUGraph inGraph, AURenderCallback inCallback, void *inRefCon );

    Parameters

    inGraph

    inCallback

    inRefCon

    Return Value

    Discussion

    Adds a callback that the graph will call every time the graph renders. The callback will be called once before the graph’s render operation, and once after the render operation is complete.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Clears all of the interactions in an audio unit processing graph.

    Declaration

    Swift

    func AUGraphClearConnections(_ inGraph: AUGraph) -> OSStatus

    Objective-C

    OSStatus AUGraphClearConnections ( AUGraph inGraph );

    Parameters

    inGraph

    Return Value

    Discussion

    This will clear all connections and callback interactions of the nodes of a graph.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Closes an audio unit processing graph.

    Declaration

    Swift

    func AUGraphClose(_ inGraph: AUGraph) -> OSStatus

    Objective-C

    OSStatus AUGraphClose ( AUGraph inGraph );

    Parameters

    inGraph

    Return Value

    Discussion

    All AudioUnits are closed - leaving only its nodal representation.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Connects one node’s output to another node’s input.

    Declaration

    Swift

    func AUGraphConnectNodeInput(_ inGraph,: AUGraph, _ inSourceNode,: AUNode, _ inSourceOutputNumber,: UInt32, _ inDestNode,: AUNode, _ inDestInputNumber: UInt32) -> OSStatus

    Objective-C

    OSStatus AUGraphConnectNodeInput ( AUGraph inGraph, AUNode inSourceNode, UInt32 inSourceOutputNumber, AUNode inDestNode, UInt32 inDestInputNumber );

    Parameters

    inGraph,

    inSourceNode,

    inSourceOutputNumber,

    inDestNode,

    inDestInputNumber

    Return Value

    A result code.

    Discussion

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Retrieves the number of interactions of an audio processing graph’s node.

    Declaration

    Swift

    func AUGraphCountNodeInteractions(_ inGraph: AUGraph, _ inNode: AUNode, _ outNumInteractions: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    OSStatus AUGraphCountNodeInteractions ( AUGraph inGraph, AUNode inNode, UInt32 *outNumInteractions );

    Parameters

    inGraph

    inNode

    outNumInteractions

    Return Value

    A result code.

    Discussion

    The number of node interactions currently being managed by the graph for the specified node.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Disconnects a node’s input.

    Declaration

    Swift

    func AUGraphDisconnectNodeInput(_ inGraph: AUGraph, _ inDestNode: AUNode, _ inDestInputNumber: UInt32) -> OSStatus

    Objective-C

    OSStatus AUGraphDisconnectNodeInput ( AUGraph inGraph, AUNode inDestNode, UInt32 inDestInputNumber );

    Parameters

    inGraph

    inDestNode

    inDestInputNumber

    Return Value

    A result code.

    Discussion

    Use this function to disconnect a connection or a callback interaction.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Obtains the short-term running average of the current CPU load of the audio processing graph.

    Declaration

    Swift

    func AUGraphGetCPULoad(_ inGraph: AUGraph, _ outAverageCPULoad: UnsafeMutablePointer<Float32>) -> OSStatus

    Objective-C

    OSStatus AUGraphGetCPULoad ( AUGraph inGraph, Float32 *outAverageCPULoad );

    Parameters

    inGraph

    Return Value

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Gets the audio processing graph node at a given index.

    Declaration

    Swift

    func AUGraphGetIndNode(_ inGraph: AUGraph, _ inIndex: UInt32, _ outNode: UnsafeMutablePointer<AUNode>) -> OSStatus

    Objective-C

    OSStatus AUGraphGetIndNode ( AUGraph inGraph, UInt32 inIndex, AUNode *outNode );

    Parameters

    inGraph

    The AUGraph object to get the node from.

    inIndex

    The index of the node to get.

    outNode

    On output, the node at the specified index.

    Return Value

    A result code.

    Discussion

    By using AUGraphGetNodeCount in conjunction with this call, you can iterate through the nodes of an audio processing graph.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Retrieves information about a particular interaction in an audio processing graph.

    Declaration

    Swift

    func AUGraphGetInteractionInfo(_ inGraph: AUGraph, _ inInteractionIndex: UInt32, _ outInteraction: UnsafeMutablePointer<AUNodeInteraction>) -> OSStatus

    Objective-C

    OSStatus AUGraphGetInteractionInfo ( AUGraph inGraph, UInt32 inInteractionIndex, AUNodeInteraction *outInteraction );

    Parameters

    inGraph

    inInteractionIndex

    outInteraction

    The interaction information at the specified index.

    Return Value

    A result code.

    Discussion

    An application can iterate through the interactions (as with the nodes) of a graph by retrieving the number of interactions, and then iterating an index starting from 0. The inInteractionIndex parameter is based on the outNumInteractions value and is only valid if no edits to the graph’s state have been made.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Obtains the maximum CPU load of an audio processing graph since this call was last made or since the graph was last started.

    Declaration

    Swift

    func AUGraphGetMaxCPULoad(_ inGraph: AUGraph, _ outMaxLoad: UnsafeMutablePointer<Float32>) -> OSStatus

    Objective-C

    OSStatus AUGraphGetMaxCPULoad ( AUGraph inGraph, Float32 *outMaxLoad );

    Parameters

    inGraph

    Return Value

    A result code.

    Discussion

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • The number of nodes in an audio processing graph.

    Declaration

    Swift

    func AUGraphGetNodeCount(_ inGraph: AUGraph, _ outNumberOfNodes: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    OSStatus AUGraphGetNodeCount ( AUGraph inGraph, UInt32 *outNumberOfNodes );

    Parameters

    inGraph

    the AUGraph object

    outNumberOfNodes

    the number of nodes

    Return Value

    A result code.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Retrieves information about the interactions in an audio processing graph for a given node.

    Declaration

    Swift

    func AUGraphGetNodeInteractions(_ inGraph: AUGraph, _ inNode: AUNode, _ ioNumInteractions: UnsafeMutablePointer<UInt32>, _ outInteractions: UnsafeMutablePointer<AUNodeInteraction>) -> OSStatus

    Objective-C

    OSStatus AUGraphGetNodeInteractions ( AUGraph inGraph, AUNode inNode, UInt32 *ioNumInteractions, AUNodeInteraction *outInteractions );

    Parameters

    inGraph

    inNode

    ioNumInteractions

    On input, specifies the number of interactions that can be returned. On output, the number of interactions returned.

    outInteractions

    The interactions that the specified node is involved in.

    Return Value

    A result code.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Retrieves the number of interactions for an audio processing graph.

    Declaration

    Swift

    func AUGraphGetNumberOfInteractions(_ inGraph: AUGraph, _ outNumInteractions: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    OSStatus AUGraphGetNumberOfInteractions ( AUGraph inGraph, UInt32 *outNumInteractions );

    Parameters

    inGraph

    outNumInteractions

    Return Value

    A result code.

    Discussion

    The number of node interactions currently being managed by the graph.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Initializes an audio processing graph.

    Declaration

    Swift

    func AUGraphInitialize(_ inGraph: AUGraph) -> OSStatus

    Objective-C

    OSStatus AUGraphInitialize ( AUGraph inGraph );

    Parameters

    inGraph

    Return Value

    A result code.

    Discussion

    Calling this function calls the AudioUnitInitialize function on each opened node or audio unit that is involved in a interaction. If a node is not involved, it is initialized after it becomes involved in an interaction.

    A graph must be opened before it can be initialized.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Determines whether an audio processing graph is initialized.

    Declaration

    Swift

    func AUGraphIsInitialized(_ inGraph: AUGraph, _ outIsInitialized: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus AUGraphIsInitialized ( AUGraph inGraph, Boolean *outIsInitialized );

    Parameters

    inGraph

    outIsInitialized

    Return Value

    A result code.

    Discussion

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Determines whether an audio processing graph is open.

    Declaration

    Swift

    func AUGraphIsOpen(_ inGraph: AUGraph, _ outIsOpen: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus AUGraphIsOpen ( AUGraph inGraph, Boolean *outIsOpen );

    Parameters

    inGraph

    outIsOpen

    Return Value

    A result code.

    Discussion

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Determines whether an audio processing graph running.

    Declaration

    Swift

    func AUGraphIsRunning(_ inGraph: AUGraph, _ outIsRunning: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus AUGraphIsRunning ( AUGraph inGraph, Boolean *outIsRunning );

    Parameters

    inGraph

    outIsRunning

    Return Value

    A result code.

    Discussion

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Returns information about a node object.

    Declaration

    Swift

    func AUGraphNodeInfo(_ inGraph: AUGraph, _ inNode: AUNode, _ outDescription: UnsafeMutablePointer<AudioComponentDescription>, _ outAudioUnit: UnsafeMutablePointer<AudioUnit>) -> OSStatus

    Objective-C

    OSStatus AUGraphNodeInfo ( AUGraph inGraph, AUNode inNode, AudioComponentDescription *outDescription, AudioUnit *outAudioUnit );

    Parameters

    inGraph

    The AUGraph object.

    inNode

    The node to query.

    outDescription

    The component description that would describe the AudioUnit of this node.

    outAudioUnit

    the AudioUnit of this node

    Return Value

    A result code.

    Discussion

    You can pass NULL for any output parameter whose value you don’t care about.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Opens an audio processing graph.

    Declaration

    Swift

    func AUGraphOpen(_ inGraph: AUGraph) -> OSStatus

    Objective-C

    OSStatus AUGraphOpen ( AUGraph inGraph );

    Parameters

    inGraph

    Return Value

    A result code.

    Discussion

    Upon return from this function call, the audio units belonging to the graph are open but not initialized. Specifically, no resource allocation occurs.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Removes a node from an audio processing graph.

    Declaration

    Swift

    func AUGraphRemoveNode(_ inGraph: AUGraph, _ inNode: AUNode) -> OSStatus

    Objective-C

    OSStatus AUGraphRemoveNode ( AUGraph inGraph, AUNode inNode );

    Parameters

    inGraph

    The AUGraph object that you are removing a node from.

    inNode

    The node you want to remove.

    Return Value

    A result code.

    Discussion

    Nodes can be removed in any thread context. The output node of the graph cannot be removed while the graph is running.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Removes a notification callback from an audio processing graph.

    Declaration

    Swift

    func AUGraphRemoveRenderNotify(_ inGraph: AUGraph, _ inCallback: AURenderCallback, _ inRefCon: UnsafeMutablePointer<Void>) -> OSStatus

    Objective-C

    OSStatus AUGraphRemoveRenderNotify ( AUGraph inGraph, AURenderCallback inCallback, void *inRefCon );

    Parameters

    inGraph

    inCallback

    inRefCon

    Return Value

    A result code.

    Discussion

    Removes a previously added render notification callback. You must provide both the callback and the context (in the inRefCon parameter) that was used previously to add the callback.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Sets an input callback function for a node.

    Declaration

    Swift

    func AUGraphSetNodeInputCallback(_ inGraph,: AUGraph, _ inDestNode,: AUNode, _ inDestInputNumber: UInt32, _ inInputCallback: UnsafePointer<AURenderCallbackStruct>) -> OSStatus

    Objective-C

    OSStatus AUGraphSetNodeInputCallback ( AUGraph inGraph, AUNode inDestNode, UInt32 inDestInputNumber, const AURenderCallbackStruct *inInputCallback );

    Parameters

    inGraph,

    inDestNode,

    inDestInputNumber

    inInputCallback

    The callback that will provide input data to the node.

    Return Value

    A result code.

    Discussion

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Starts an audio processing graph.

    Declaration

    Swift

    func AUGraphStart(_ inGraph: AUGraph) -> OSStatus

    Objective-C

    OSStatus AUGraphStart ( AUGraph inGraph );

    Parameters

    inGraph

    Return Value

    A result code.

    Discussion

    This function starts rendering by starting the head node of an audio processing graph. The graph must be initialized before it can be started.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Stops an audio processing graph.

    Declaration

    Swift

    func AUGraphStop(_ inGraph: AUGraph) -> OSStatus

    Objective-C

    OSStatus AUGraphStop ( AUGraph inGraph );

    Parameters

    inGraph

    Return Value

    A result code.

    Discussion

    This function stops rendering by stopping the head node of an audio processing graph.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Uninitializes an audio processing graph.

    Declaration

    Swift

    func AUGraphUninitialize(_ inGraph: AUGraph) -> OSStatus

    Objective-C

    OSStatus AUGraphUninitialize ( AUGraph inGraph );

    Parameters

    inGraph

    Return Value

    A result code.

    Discussion

    This function uninitializes the audio units that compose the audio processing graph.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Updates the state of a running audio processing graph.

    Declaration

    Swift

    func AUGraphUpdate(_ inGraph: AUGraph, _ outIsUpdated: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus AUGraphUpdate ( AUGraph inGraph, Boolean *outIsUpdated );

    Parameters

    inGraph

    outIsUpdated

    In input, pass NULL for synchronous (blocking) behavior, or non-NULL to have this function return immediately. On output, true if all of the edits were applied to the audio processing graph at the time of function return.

    Return Value

    A result code.

    Discussion

    Call this function to finalize changes to an audio processing graph’s state after making calls such as AUGraphConnectNodeInput.

    Node connections and disconnections can be completely processed in the render notification callback of a graph, finalized by calling this function from within the callback. You can also remove nodes (apart from the head node) from within the render notification callback.

    If this function returns the kAUGraphErr_CannotDoInCurrentContext result code, another thread was calling a function dependent on the graph’s existing state. When the competing thread completes its call, call this function again.

    Audio processing graph updates are all or none. If this function encounters any errors while attempting to finalize graph events, then no pending changes are finalized.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Disposes of an audio processing graph.

    Declaration

    Swift

    func DisposeAUGraph(_ inGraph: AUGraph) -> OSStatus

    Objective-C

    OSStatus DisposeAUGraph ( AUGraph inGraph );

    Parameters

    inGraph

    the AUGraph object to be disposed

    Return Value

    A result code.

    Discussion

    Creates an AUGraph.

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Creates a new audio processing graph.

    Declaration

    Swift

    func NewAUGraph(_ outGraph: UnsafeMutablePointer<AUGraph>) -> OSStatus

    Objective-C

    OSStatus NewAUGraph ( AUGraph *outGraph );

    Parameters

    outGraph

    The new AUGraph object

    Return Value

    A result code.

    Discussion

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

Data Types

  • A connection between two node objects in an audio processing graph.

    Declaration

    Objective-C

    struct AudioUnitNodeConnection { AUNode sourceNode; UInt32 sourceOutputNumber; AUNode destNode; UInt32 destInputNumber; }; typedef struct AudioUnitNodeConnection AudioUnitNodeConnection; typedef struct AudioUnitNodeConnection AUNodeConnection;

    Fields

    sourceNode

    sourceOutputNumber

    destNode

    destInputNumber

    Availability

    Available in iOS 2.0 and later.

  • An opaque type representing an audio processing graph.

    Declaration

    Swift

    typealias AUGraph = COpaquePointer

    Objective-C

    typedef struct OpaqueAUGraph *AUGraph;

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • A member of an audio processing graph, associated with an audio unit.

    Declaration

    Swift

    typealias AUNode = Int32

    Objective-C

    typedef SInt32 AUNode;

    Import Statement

    Objective-C

    @import AudioToolbox;

    Swift

    import AudioToolbox

    Availability

    Available in iOS 2.0 and later.

  • Describes the interaction between two node objects.

    Declaration

    Swift

    struct AUNodeInteraction { var nodeInteractionType: UInt32 }

    Objective-C

    struct AUNodeInteraction { UInt32 nodeInteractionType; union { AUNodeConnection connection; AUNodeRenderCallback inputCallback; } nodeInteraction; }; typedef struct AUNodeInteraction AUNodeInteraction;

    Fields

    nodeInteractionType

    The interaction type.

    nodeInteraction

    A union providing information about a node interaction.

    Discussion

    This structure contains information about the interaction between two nodes (in the case of a connection), or the input to a node (in the case of a callback).

    The type of the interaction is used to determine how to interpret the contents of the following union.

    There may be other nodal interactions in the future, so NO ASSUMPTIONS should be made that these are the only two nodal interaction types; you must always check the nodeInteractionType and only act on those types you understand.

    Arrays of these structs can be returned, the addition of new members to the nodeInteraction union will NOT change the size of this structure.

    Availability

    Available in iOS 2.0 and later.

  • A callback used to provide input to an audio unit.

    Declaration

    Swift

    struct AUNodeRenderCallback { var destNode: AUNode var destInputNumber: AudioUnitElement var cback: AURenderCallbackStruct }

    Objective-C

    struct AUNodeRenderCallback { AUNode destNode; AudioUnitElement destInputNumber; AURenderCallbackStruct cback; }; typedef struct AUNodeRenderCallback AUNodeRenderCallback;

    Fields

    destNode

    destInputNumber

    cback

    Discussion

    Used to contain information when a callback is used to provide input to the specific node's specified input.

    Availability

    Available in iOS 2.0 and later.

Constants

  • The different types of node interactions.

    Declaration

    Swift

    var kAUNodeInteraction_Connection: Int { get } var kAUNodeInteraction_InputCallback: Int { get }

    Objective-C

    enum { kAUNodeInteraction_Connection = 1, kAUNodeInteraction_InputCallback = 2 };

    Constants

    • kAUNodeInteraction_Connection

      kAUNodeInteraction_Connection

      connections between 2 audio units,

      Available in iOS 2.0 and later.

    • kAUNodeInteraction_InputCallback

      kAUNodeInteraction_InputCallback

      input callbacks being registered to a single audio unit’s input bus.

      Available in iOS 2.0 and later.

    Discussion

    The term interaction is used as a general term to describe some interaction of a node. Currently, the interactions of a node that the graph manages are described below.

Result Codes

This table lists the result codes defined for Audio Unit Processing Graph Services.

  • The specified node cannot be found.

    Value

    -10860

    Description

    The specified node cannot be found.

    Available in iOS 2.0 and later.

  • The attempted connection between two nodes cannot be made.

    Value

    -10861

    Description

    The attempted connection between two nodes cannot be made.

    Available in iOS 2.0 and later.

  • Audio processing graphs can only contain one output unit. This error is returned if trying to add a second output unit or if the graph’s output unit is removed while the graph is running.

    Value

    -10862

    Description

    Audio processing graphs can only contain one output unit. This error is returned if trying to add a second output unit or if the graph’s output unit is removed while the graph is running.

    Available in iOS 2.0 and later.

  • To avoid spinning or waiting in the render thread (a bad idea!), many of the calls to AUGraph can return: kAUGraphErr_CannotDoInCurrentContext. This result is only generated when you call an AUGraph API from its render callback. It means that the lock that it required was held at that time, by another thread. If you see this result code, you can generally attempt the action again - typically the NEXT render cycle (so in the mean time the lock can be cleared), or you can delegate that call to another thread in your app. You should not spin or put-to-sleep the render thread.

    Value

    -10863

    Description

    To avoid spinning or waiting in the render thread (a bad idea!), many of the calls to AUGraph can return: kAUGraphErr_CannotDoInCurrentContext. This result is only generated when you call an AUGraph API from its render callback. It means that the lock that it required was held at that time, by another thread. If you see this result code, you can generally attempt the action again - typically the NEXT render cycle (so in the mean time the lock can be cleared), or you can delegate that call to another thread in your app. You should not spin or put-to-sleep the render thread.

    Available in iOS 2.0 and later.

  • Value

    -10864

    Description

    Available in iOS 2.0 and later.