<!--
{
  "availability" : [
    "macOS: 10.2.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/AUGraphNewNodeSubGraph(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@AUGraphNewNodeSubGraph"
  },
  "title" : "AUGraphNewNodeSubGraph(_:_:)"
}
-->

# AUGraphNewNodeSubGraph(_:_:)

Creates a node object to represent a subgraph.

```
func AUGraphNewNodeSubGraph(_ inGraph: AUGraph, _ outNode: UnsafeMutablePointer<AUNode>) -> OSStatus
```

## Parameters

`inGraph`

The AUGraph object that you want to add a subgraph to.

`outNode`

The node that represents the subgraph.

## Return Value

A result code.

## Discussion

This function creates a node that represents a subgraph. The subgraph can be retrieved with the [`AUGraphGetNodeInfoSubGraph(_:_:_:)`](/documentation/AudioToolbox/AUGraphGetNodeInfoSubGraph(_:_:_:)) function. The subgraph is owned by the parent graph and will be disposed when the parent graph is disposed or when the node is removed from the parent graph.

---

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)