Routing rules

The configuration file can be used to specify routing behavior for the different types of audio streams.

The "Routing Rules" configuration value specifies the routing of audio streams, in order of priority. It contains the audio stream types listed in priority. Supported audio stream types, in alphabetical order, are: "alert", "default", "inputfeedback", "multimedia", "pushtotalk", "ringtone", " soundeffect", " texttospeech", " videochat", " voice", " voicerecognition", "voicerecording", and " voicetones".

Under each audio stream type, "Devices" attribute specify pairs of output and input devices, in order of priority for the audio stream type:

Attribute Description
Devices The input and output devices where this audio stream type is routed.
Output The output route for the audio stream.
Input The input route for the audio stream.

For a list of routing paths and priorities by audio stream type, see Supported routing paths. For a list of device types, see Definitions in audio_manager_device.h.

Example

The codes snippet below taken from the "Routing Rules" section of a configuration file shows that for this implementation:

 
"ringtone":{
      "Devices":{
        "Output":"speaker",
        "Input":"usb"
      },
      "Devices":{
        "Output":"speaker",
        "Input":"handset"
      },
      ...
"videochat":{
      "Devices":{
        "Output":"headset",
        "Input":"headset"
      },
      "Devices":{
        "Output":"headphone",
        "Input":"usb"
      },
      ...