<!--
{
  "documentType" : "article",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/audio-unit-processing-graph-services",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Audio Unit Processing Graph Services"
}
-->

# Audio Unit Processing Graph Services

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.

## Discussion

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.

## Topics

### Audio Unit Processing Graph Services Functions

[`AUGraphAddNode(_:_:_:)`](/documentation/AudioToolbox/AUGraphAddNode(_:_:_:))

Adds a node to an audio processing graph.

[`AUGraphAddRenderNotify(_:_:_:)`](/documentation/AudioToolbox/AUGraphAddRenderNotify(_:_:_:))

Adds a render notification callback to an audio processing graph.

[`AUGraphClearConnections(_:)`](/documentation/AudioToolbox/AUGraphClearConnections(_:))

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

[`AUGraphClose(_:)`](/documentation/AudioToolbox/AUGraphClose(_:))

Closes an audio unit processing graph.

[`AUGraphConnectNodeInput(_:_:_:_:_:)`](/documentation/AudioToolbox/AUGraphConnectNodeInput(_:_:_:_:_:))

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

[`AUGraphCountNodeConnections`](/documentation/AudioToolbox/AUGraphCountNodeConnections)

Deprecated in OS X v10.5. Instead, use [`AUGraphCountNodeInteractions(_:_:_:)`](/documentation/AudioToolbox/AUGraphCountNodeInteractions(_:_:_:)).

[`AUGraphCountNodeInteractions(_:_:_:)`](/documentation/AudioToolbox/AUGraphCountNodeInteractions(_:_:_:))

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

[`AUGraphDisconnectNodeInput(_:_:_:)`](/documentation/AudioToolbox/AUGraphDisconnectNodeInput(_:_:_:))

Disconnects a node’s input.

[`AUGraphGetConnectionInfo`](/documentation/AudioToolbox/AUGraphGetConnectionInfo)

Deprecated in OS X v10.5. Instead, use [`AUGraphGetInteractionInfo(_:_:_:)`](/documentation/AudioToolbox/AUGraphGetInteractionInfo(_:_:_:)).

[`AUGraphGetCPULoad(_:_:)`](/documentation/AudioToolbox/AUGraphGetCPULoad(_:_:))

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

[`AUGraphGetIndNode(_:_:_:)`](/documentation/AudioToolbox/AUGraphGetIndNode(_:_:_:))

Gets the audio processing graph node at a given index.

[`AUGraphGetInteractionInfo(_:_:_:)`](/documentation/AudioToolbox/AUGraphGetInteractionInfo(_:_:_:))

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

[`AUGraphGetMaxCPULoad(_:_:)`](/documentation/AudioToolbox/AUGraphGetMaxCPULoad(_:_:))

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

[`AUGraphGetNodeConnections`](/documentation/AudioToolbox/AUGraphGetNodeConnections)

Deprecated in OS X v10.5. Instead, use [`AUGraphGetNodeInteractions(_:_:_:_:)`](/documentation/AudioToolbox/AUGraphGetNodeInteractions(_:_:_:_:)).

[`AUGraphGetNodeCount(_:_:)`](/documentation/AudioToolbox/AUGraphGetNodeCount(_:_:))

The number of nodes in an audio processing graph.

[`AUGraphGetNodeInfo`](/documentation/AudioToolbox/AUGraphGetNodeInfo)

Deprecated in OS X v10.5. Instead, use [`AUGraphNodeInfo(_:_:_:_:)`](/documentation/AudioToolbox/AUGraphNodeInfo(_:_:_:_:)).

[`AUGraphGetNodeInfoSubGraph(_:_:_:)`](/documentation/AudioToolbox/AUGraphGetNodeInfoSubGraph(_:_:_:))

Gets the audio processing subgraph object represented by a node.

[`AUGraphGetNodeInteractions(_:_:_:_:)`](/documentation/AudioToolbox/AUGraphGetNodeInteractions(_:_:_:_:))

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

[`AUGraphGetNumberOfConnections`](/documentation/AudioToolbox/AUGraphGetNumberOfConnections)

Deprecated in OS X v10.5. Instead, use [`AUGraphGetNumberOfInteractions(_:_:)`](/documentation/AudioToolbox/AUGraphGetNumberOfInteractions(_:_:)).

[`AUGraphGetNumberOfInteractions(_:_:)`](/documentation/AudioToolbox/AUGraphGetNumberOfInteractions(_:_:))

Retrieves the number of interactions for an audio processing graph.

[`AUGraphInitialize(_:)`](/documentation/AudioToolbox/AUGraphInitialize(_:))

Initializes an audio processing graph.

[`AUGraphIsInitialized(_:_:)`](/documentation/AudioToolbox/AUGraphIsInitialized(_:_:))

Determines whether an audio processing graph is initialized.

[`AUGraphIsNodeSubGraph(_:_:_:)`](/documentation/AudioToolbox/AUGraphIsNodeSubGraph(_:_:_:))

Determines whether a node object represent an audio processing graph or an audio unit.

[`AUGraphIsOpen(_:_:)`](/documentation/AudioToolbox/AUGraphIsOpen(_:_:))

Determines whether an audio processing graph is open.

[`AUGraphIsRunning(_:_:)`](/documentation/AudioToolbox/AUGraphIsRunning(_:_:))

Determines whether an audio processing graph running.

[`AUGraphNewNode`](/documentation/AudioToolbox/AUGraphNewNode)

Deprecated in OS X v10.5. Instead, use [`AUGraphAddNode(_:_:_:)`](/documentation/AudioToolbox/AUGraphAddNode(_:_:_:)).

[`AUGraphNewNodeSubGraph(_:_:)`](/documentation/AudioToolbox/AUGraphNewNodeSubGraph(_:_:))

Creates a node object to represent a subgraph.

[`AUGraphNodeInfo(_:_:_:_:)`](/documentation/AudioToolbox/AUGraphNodeInfo(_:_:_:_:))

Returns information about a node object.

[`AUGraphOpen(_:)`](/documentation/AudioToolbox/AUGraphOpen(_:))

Opens an audio processing graph.

[`AUGraphRemoveNode(_:_:)`](/documentation/AudioToolbox/AUGraphRemoveNode(_:_:))

Removes a node from an audio processing graph.

[`AUGraphRemoveRenderNotify(_:_:_:)`](/documentation/AudioToolbox/AUGraphRemoveRenderNotify(_:_:_:))

Removes a notification callback from an audio processing graph.

[`AUGraphSetNodeInputCallback(_:_:_:_:)`](/documentation/AudioToolbox/AUGraphSetNodeInputCallback(_:_:_:_:))

Sets an input callback function for a node.

[`AUGraphStart(_:)`](/documentation/AudioToolbox/AUGraphStart(_:))

Starts an audio processing graph.

[`AUGraphStop(_:)`](/documentation/AudioToolbox/AUGraphStop(_:))

Stops an audio processing graph.

[`AUGraphUninitialize(_:)`](/documentation/AudioToolbox/AUGraphUninitialize(_:))

Uninitializes an audio processing graph.

[`AUGraphUpdate(_:_:)`](/documentation/AudioToolbox/AUGraphUpdate(_:_:))

Updates the state of a running audio processing graph.

[`DisposeAUGraph(_:)`](/documentation/AudioToolbox/DisposeAUGraph(_:))

Disposes of an audio processing graph.

[`NewAUGraph(_:)`](/documentation/AudioToolbox/NewAUGraph(_:))

Creates a new audio processing graph.

### Data Types

[`AudioUnitNodeConnection`](/documentation/AudioToolbox/AudioUnitNodeConnection)

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

[`AUGraph`](/documentation/AudioToolbox/AUGraph)

An opaque type representing an audio processing graph.

[`AUNode`](/documentation/AudioToolbox/AUNode)

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

[`AUNodeInteraction`](/documentation/AudioToolbox/AUNodeInteraction)

Describes the interaction between two node objects.

[`AUNodeRenderCallback`](/documentation/AudioToolbox/AUNodeRenderCallback)

A callback used to provide input to an audio unit.

### Constants

[kAUNodeInteraction_Connection](/documentation/AudioToolbox/1537633-kaunodeinteraction-connection)

The different types of node interactions.

### Result Codes

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

[`kAUGraphErr_NodeNotFound`](/documentation/AudioToolbox/kAUGraphErr_NodeNotFound)

The specified node cannot be found.

[`kAUGraphErr_InvalidConnection`](/documentation/AudioToolbox/kAUGraphErr_InvalidConnection)

The attempted connection between two nodes cannot be made.

[`kAUGraphErr_OutputNodeErr`](/documentation/AudioToolbox/kAUGraphErr_OutputNodeErr)

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.

[`kAUGraphErr_CannotDoInCurrentContext`](/documentation/AudioToolbox/kAUGraphErr_CannotDoInCurrentContext)

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.

[`kAUGraphErr_InvalidAudioUnit`](/documentation/AudioToolbox/kAUGraphErr_InvalidAudioUnit)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)