Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVAudioEngineMBS class.

AVAudioEngineMBS.attachedNodes as AVAudioNodeMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 21.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Set of all nodes attached to the engine.

Available in macOS 10.15 or newer.
Available in iOS 10.13 or newer.

AVAudioEngineMBS.attachNode(node as AVAudioNodeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Attaches a new audio node to the audio engine.

node: The audio node to be attached to the audio engine.

To support the instantiation of arbitrary AVAudioNode subclasses, instances are created externally to the audio engine but are unusable until attached to the audio engine using this method.

Some examples using this method:

AVAudioEngineMBS.connect(node1 as AVAudioNodeMBS, node2 as AVAudioNodeMBS, bus1 as Integer, bus2 as Integer, format as AVAudioFormatMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Establish a connection between two audio nodes, specifying the input and output busses.

node1: The source audio node.
node2: The destination audio node.
bus1: The output bus of the source audio node.
bus2: The input bus of the destination audio node.
format: If not nil, the format of the source audio node’s output bus is set to this AVAudioFormat object. In all cases, the format of the destination audio node’s input bus is set to match that of the source audio node’s output bus.

Audio nodes have input and output busses (AVAudioNodeBus). Use this method to establish connections between audio nodes. Connections are always one-to-one, never one-to-many or many-to-one.

See also:

AVAudioEngineMBS.connect(node1 as AVAudioNodeMBS, node2 as AVAudioNodeMBS, format as AVAudioFormatMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Establishes a connection between two audio nodes.

node1: The source audio node.
node2: The destination audio node.
format:If not nil, the format of the source audio node’s output bus is set to this AVAudioFormat object. In all cases, the format of the destination audio node’s input bus is set to match that of the source audio node’s output bus.

This method calls connect method using bus 0 for the source audio node, and bus 0 for the destination audio node, except in the case of a destination which is a mixer, in which case the destination is the mixer’s nextAvailableInputBus.

See also:

AVAudioEngineMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The constructor.

AVAudioEngineMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The destructor.

AVAudioEngineMBS.detachNode(node as AVAudioNodeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Detaches a audio node previously attached to the audio engine.

node: The audio node to be detached from the audio engine.

If necessary, the audio engine will safely disconnect the audio node before detaching it.

AVAudioEngineMBS.disableManualRenderingMode

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 21.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the engine to render to or from an audio device.

AVAudioEngineMBS.disconnectNodeInput(node as AVAudioNodeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes all input connections of the audio node.

node: The audio node whose inputs you want to disconnect.

Connections are broken on each of the audio node’s input buses.

See also:

AVAudioEngineMBS.disconnectNodeInput(node as AVAudioNodeMBS, bus as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes the input connection of an audio node on the specified bus.

node: The audio node whose input is to be disconnected.
bus: The destination’s input bus to be disconnected.

See also:

AVAudioEngineMBS.disconnectNodeOutput(node as AVAudioNodeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Remove all output connections of an audio node.

node: The audio node whose outputs are to be disconnected.

See also:

AVAudioEngineMBS.disconnectNodeOutput(node as AVAudioNodeMBS, bus as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Remove the output connection of an audio node on the specified bus.

node: The audio node whose output is to be disconnected.
bus: The destination’s output bus to disconnect.

See also:

AVAudioEngineMBS.enableManualRenderingMode(mode as Integer, pcmFormat as AVAudioFormatMBS, maximumFrameCount as UInt32, byref error as NSErrorMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 21.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the engine to operate in manual rendering mode with the specified render format and maximum frame count.

Use this method to configure the engine to render in response to requests from the client. You must stop the engine before calling this method. The render format must be a PCM format and match the format of the rendering buffer.
The input data in manual rendering mode can be supplied through the source nodes. See AVAudioPlayerNode and AVAudioInputNode.

Some examples using this method:

AVAudioEngineMBS.pause

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Pauses the audio engine.

Stops the flow of audio through the audio engine but does not deallocate the resources allocated by prepare.
You resume the audio engine by invoking startAndReturnError again.

AVAudioEngineMBS.prepare

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Prepares the audio engine for starting.

This method preallocates many of the resources that the audio engine requires in order to start. Use it in order to start audio input or output more responsively.

AVAudioEngineMBS.renderOffline(numberOfFrames as UInt32, buffer as AVAudioPCMBufferMBS, byref error as NSErrorMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 21.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Makes a render call to the engine operating in the offline manual rendering mode.

Some examples using this method:

AVAudioEngineMBS.reset

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Resets all of the audio nodes in the audio engine.

This methods resets all of the audio nodes in the audio engine. Use it, for example, to silence reverb and delay tails.

AVAudioEngineMBS.startAndReturnError(byref error as NSErrorMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Starts the audio engine.

Error: Returns, by-reference, a description of the error.

Returns true if the audio engine started successfully; otherwise, false.
This method invokes the prepare method if it has not already been called since stop was invoked.
It then starts the audio hardware via the AVAudioInputNode and/or AVAudioOutputNode instances in the audio engine.

Errors can occur when:

  • There is problem in the structure of the graph. Input can't be routed to output or to a recording tap through converter type nodes.
  • An AVAudioSession error occurred
  • The driver failed to start the hardware

Some examples using this method:

AVAudioEngineMBS.stop

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Stop the audio engine.

Releases the resources allocated by the prepare method.

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...