---
title: SetPreferredChannelsForStereo
framework: audiodriverkit
role: symbol
role_heading: Instance Method
path: audiodriverkit/iouseraudiodevice/setpreferredchannelsforstereo
---

# SetPreferredChannelsForStereo

Sets the channel indices for the prefered stereo pair.

## Declaration

```occ
kern_return_t SetPreferredChannelsForStereo(uint32_t in_left_channel, uint32_t in_right_channel);
```

## Parameters

- `in_left_channel`: The channel index for the left channel.
- `in_right_channel`: The channel index for the right channel.

## Return Value

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

## See Also

### Working with Channel Layouts

- [GetPreferredChannelsForStereo](audiodriverkit/iouseraudiodevice/getpreferredchannelsforstereo.md)
- [SetPreferredInputChannelLayout](audiodriverkit/iouseraudiodevice/setpreferredinputchannellayout.md)
- [SetPreferredOutputChannelLayout](audiodriverkit/iouseraudiodevice/setpreferredoutputchannellayout.md)
- [IOUserAudioChannelLabel](audiodriverkit/audiodriverkit/iouseraudiochannellabel.md)
