tree: 458f172eda19fe77319293a6d3b4540ac663aedd [path history] [tgz]
  1. BUILD.gn
  2. README.md
  3. virtual_audio.cc
src/media/audio/tools/virtual_audio_util/README.md

Virtual audio utility

The virtual audio utility enables developers to interactively configure/control virtual audio devices, through the virtual_audio driver.

Examples

Input and output devices

To add an input and an output device with default configurations in one call to virtual_audio:

$ virtual_audio --add --in --add --wait
Executing `--add' command...
Executing `--in' command...
Executing `--add' command...
Executing `--wait' command...
Press Q to cancel, or any other key to continue...

The first --add adds an output device, then --in shifts to reference the configuration of an input device, then the second --add adds an input device.

Note: without --wait the utility exits upon completion, which drops all FIDL connections (thus closing all devices).

Executing commands with waits

The --wait option can be used to execute commands one at a time, waiting for a key press before proceeding. This is useful for observing changes like plug/unplug, or clock rate changes, such as:

$ virtual_audio --domain=1 --add --wait --rate=1000 --wait
Executing `--domain' command...
Executing `--add' command...
Executing `--wait' command...
	Press Q to cancel, or any other key to continue...
Executing `--rate' command...
Executing `--wait' command...
	Press Q to cancel, or any other key to continue...
$ virtual_audio --domain=1 --add --wait --rate=1000 --wait --unplug --wait
Executing `--domain' command...
Executing `--add' command...
Executing `--wait' command...
	Press Q to cancel, or any other key to continue...
Executing `--rate' command...
Executing `--wait' command...
	Press Q to cancel, or any other key to continue...
Executing `--unplug' command...
Executing `--wait' command...
	Press Q to cancel, or any other key to continue...