SoundIoDevice.current_format

A device is either a raw device or it is a virtual device that is provided by a software mixing service such as dmix or PulseAudio (see SoundIoDevice::is_raw). If it is a raw device, current_format is meaningless; the device has no current format until you open it. On the other hand, if it is a virtual device, current_format describes the destination sample format that your audio will be converted to. Or, if you're the lucky first application to open the device, you might cause the current_format to change to your format. Generally, you want to ignore current_format and use whatever format is most convenient for you which is supported by the device, because when you are the only application left, the mixer might decide to switch current_format to yours. You can learn the supported formats via formats and SoundIoDevice::format_count. If this information is missing due to a probe error, formats will be NULL. If current_format is unavailable, it will be set to #SoundIoFormatInvalid. Devices are guaranteed to have at least 1 format available.

struct SoundIoDevice
SoundIoFormat current_format;

Meta