| # 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... |
| ``` |