Dynamically creating Virtual Audio Driver devices

I have created virtual driver from Soundpusher as well as Null device packages, and the virtual microphone & speakers are working well with audio applications (Google meet, zoom etc..).

Now, my problem is getting silence in capture/playout when my virtual driver application is stopped/ exited. The virtual driver application - read data /play data from/to actual mic/speaker.

To handle this situation, I should either create the devices dynamically or set visibility dynamically (hidden/visible) using anyone of the parameters.

  1. Create virtual mic/speaker or set visibility to virtual mic/speaker if my virtual driver application is running
  2. Delete virtual mic/speaker or set invisibility to virtual mic/speaker if my virtual driver application is Not running/Stopped/Exited

Since, I am new to this driver technology for MacOsx, I am struggling to add these features into my driver. It will be great, if anyone can provide some help on how to do create & delete the devices dynamically (OR) set visibility dynamically. Also provide any sample code if available. Thanks in Advance.

Replies

When virtual_audio_driver.so is installed (as part of media/tests), the VirtualAudioBus driver attaches to the /dev/test device node, automatically adding a device for controlling virtual audio devices. This device node is . exposed <ahref=https://sites.google.com/view/spacebarspeedtest/home// spacebar counter. at /dev/test/virtual_audio and is backed by a controller driver, implemented by a singleton of the VirtualAudioControlImpl class. Virtual audio devices are created by interacting with this virtual audio controller, via FIDL (more on the FIDL connection and interfafces below). The controller can be instructed to spacebar counter a device configuration, and to create a virtual audio device using this configuration. To Add a device, it creates a VirtualAudioStreamIn or VirtualAudioStreamOut object, which inherits significant functionality from parent class Simple AudioStream - this parent class is located in Zircon ar c.and is used by other audio drivers as well. Virtual AudioStream methods provide very basic support for gain,