<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.2.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/AudioCodecReset(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@AudioCodecReset"
  },
  "title" : "AudioCodecReset(_:)"
}
-->

# AudioCodecReset(_:)

Flushes all the audio data in the codec and clears the input buffer.

```
func AudioCodecReset(_ inCodec: AudioCodec) -> OSStatus
```

## Parameters

`inCodec`

An audio codec object. Because an audio codec object is a Component Manger component instance, you can use the Component Manager (for example, the functions <doc://com.apple.documentation/documentation/coreservices/1516552-findnextcomponent> and OpenAComponent) to obtain an audio codec object.

## Return Value

Returns `NoErr` if successful, otherwise, a result code. See `Result Codes` for a list of possible values.

## Discussion

The input and output formats, magic cookie data, and other state variables are retained so that you needn’t call the [`AudioCodecInitialize(_:_:_:_:_:)`](/documentation/AudioToolbox/AudioCodecInitialize(_:_:_:_:_:)) function again unless the values of some variables have changed.

---

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)