Control events

You may have an application that needs to monitor audio management events and be notified when an event occurs.

Tip: Control events are available if you have Audio component BuildID 387—October 2, 2017 (7.0.387.S201710021920) or a later update installed.
These events track active audio streams and let you know what audio types are active on the system. You have to call snd_ctl_read() after the select() to read the event from the queue. If it's a SND_CTL_READ_AUDIOMGMT_CHG event, then use snd_ctl_ducking_read() to read the audio management status. Any audio that has been ducked to zero or has been preempted (e.g., in the SUSPENDED state) is considered not to be active.
Note: Audio streams that have been user-paused (e.g., snd_pcm_*_pause()) are considered active.

For an example of how to monitor events and determine the state of active audio streams on the system, see the audiomgmt_monitor.c example appendix. As part of using control events, you can specify the ducking outputs that you want to monitor. You can specify the name as a [CTRL] key in the audio configuration file or as a option when you start io-audio. For more information, see io-audio in the Utilities Reference.