Audio Manager Routing Priority

The audio manager allows client applications to control the routing of their audio streams.

The main audio device attached to the system supports only a single main mix. This means that, unless client applications specify audio routing paths, the system automatically selects for output the audio stream from the connected device with the highest priority in the current mode of operation.

Every type of audio stream has a priority relative to other types of audio stream types. In the event that two or more audio streams require concurrent access to an output device, the system grants access to the output device to the stream with the highest priority type. For example, if AUDIO_TYPE_DEFAULT is the type of the active stream, and a second stream of type AUDIO_TYPE_VIDEO_CHAT begins, the routing, tuning, and attenuation policies of the AUDIO_TYPE_VIDEO_CHAT stream take effect, since this stream has the higher priority.

The table below lists the audio stream types, in descending order of priority (that is, the higher the audio type is in the table, the higher its priority), as well as the effect on each stream type if it is pre-empted. The pre-empted stream may be either muted or fully attenuated:
Name Description Concurrency Rule
AUDIO_TYPE_SOUND_EFFECT Sound effects that can never be attenuated, such as the camera click. Fully attenuates all lower priority audio streams.
AUDIO_TYPE_RINGTONE Used for playback of ringtones when an incoming phone call occurs. Fully attenuates all lower priority audio streams.
AUIDO_TYPE_VOICE_TONES DTMF and call progress tones. Can also be used to playback non-tone-based audio during phone call however. Fully attenuates all lower priority audio streams.
AUDIO_TYPE_VOICE Voice band related streams, and specific activities related to telephony (cellular or VOIP). Mutes all lower priority audio streams.
AUDIO_TYPE_VIDEO_CHAT Used by the video chat client. This type is not covered by AUDIO_TYPE_VOICE because of a difference in automatic routing policy. Mutes all lower priority audio streams.
AUDIO_TYPE_PUSH_TO_TALK Used to denote streams related to push-to-talk use cases. Fully attenuates all lower priority audio streams.
AUDIO_TYPE_VOICE_RECOGNITION Voice recognition services, such as VAD. Mutes all lower priority audio streams.
AUDIO_TYPE_TEXT_TO_SPEECH Text to speech services. Attenuates lower priority audio streams by 40%.
AUDIO_TYPE_ALERT Notifiers, such as for calendar events, email, SMS, instant messaging, and so on. Attenuates lower priority audio streams by 40%.
AUDIO_TYPE_VOICE_RECORDING Voice recording services, such as focal points. No change to other streams.
AUDIO_TYPE_MULTIMEDIA Used by media player applications. No change to other streams.
AUDIO_TYPE_DEFAULT Any unclassified audio stream is of type default. No change to other streams.