---
title: SetAvailableStreamFormats
framework: audiodriverkit
role: symbol
role_heading: Instance Method
path: audiodriverkit/iouseraudiostream/setavailablestreamformats
---

# SetAvailableStreamFormats

Sets the available stream formats to an array of audio stream basic descriptions.

## Declaration

```occ
kern_return_t SetAvailableStreamFormats(const IOUserAudioStreamBasicDescription *in_formats, uint32_t in_num_formats);
```

## Parameters

- `in_formats`: A pointer to a buffer of IOUserAudioStreamBasicDescription instances, with a size of in_num_formats.
- `in_num_formats`: The number of stream descriptions in in_formats.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. For a list of error codes, see Error Codes.

## Discussion

Discussion If successful, changing the available formats sends a notification to the host to update the object state. This method synchronizes by using the work queue created by the object.

## See Also

### Working with Stream Formats

- [SetCurrentStreamFormat](audiodriverkit/iouseraudiostream/setcurrentstreamformat.md)
- [GetCurrentStreamFormat](audiodriverkit/iouseraudiostream/getcurrentstreamformat.md)
- [GetAvailableStreamFormats](audiodriverkit/iouseraudiostream/getavailablestreamformats.md)
- [GetNumberAvailableStreamFormats](audiodriverkit/iouseraudiostream/getnumberavailablestreamformats.md)
- [IOUserAudioStreamBasicDescription](audiodriverkit/audiodriverkit/iouseraudiostreambasicdescription.md)
- [GetStreamDirection](audiodriverkit/iouseraudiostream/getstreamdirection.md)
- [IOUserAudioStreamDirection](audiodriverkit/audiodriverkit/iouseraudiostreamdirection.md)
- [SetStreamIsActive](audiodriverkit/iouseraudiostream/setstreamisactive.md)
- [GetStreamIsActive](audiodriverkit/iouseraudiostream/getstreamisactive.md)
