Skip to content

Audio devices

Audio is where this product is most useful and least finished. Device listing works and is read-only — device-bridge never changes your default device. Loopback capture runs but is silent without a permission grant. The virtual microphone is written and blocked on a certificate.

Terminal window
device-bridge audio list [--json]

Each entry carries id, name, isInput, isOutput, isDefaultIn, isDefaultOut. A single physical device can expose both an input and an output stream, so isInput and isOutput are not mutually exclusive.

The table marks the current default input and output, and prints a one-line setup: verdict underneath. --json gives the same facts to a script.

One-time setup: you select the device, we never do

Section titled “One-time setup: you select the device, we never do”
Terminal window
device-bridge install audio # needs sudo; restarts coreaudiod

Then open System Settings > Sound (macOS) or Settings > System > Sound (Windows) and select “device-bridge Audio” as the Output — and as the Input too, if the app under test should hear audio you send.

That is the whole setup, and it is the only time you touch it.

Terminal window
device-bridge audio list # the `setup:` line tells you where you stand
device-bridge audio list --check # exit 0 only if installed AND selected

Put --check at the top of a test script. An unselected device does not error when the stream starts — it produces a capture full of zeros, which reads as success. Failing loudly at the start is worth more than a green run that measured nothing.

There is no system-wide default camera on macOS — every app chooses its own. This is an API that does not exist, not a feature that is missing. Recorded in ADR 0010 so nobody goes looking for it again — and now it is simply the same shape as audio: we enumerate, you select.

Terminal window
device-bridge start audio-out --port 9332 --token "$WINDOWCTL_TOKEN"

Captures what the machine is playing, using the Core Audio process tap API (macOS 14.4+) — no third-party device installed and nothing reconfigured. Each frame is a 16-byte header with Kind = 2 (speaker) and Format = 2 (interleaved float32, little-endian) followed by raw PCM.

It is silent today. Spike S3 created the tap, built a private aggregate device, and the IOProc delivered 237,568 samples — with a measured peak of 0.0000. macOS does not raise an error when the calling process lacks the system-audio capture grant; it returns silence. The mechanism is proven; non-silent capture waits on that grant, a manual System Settings gesture with the same shape as the Screen Recording gate.

This is the lane that feeds audio into the app under test, and it is the reason the product exists. The implementation is a CoreAudio AudioServerPlugIn — a user-space HAL plugin loaded by coreaudiod, no kernel extension — written from Apple’s permissive NullAudio sample rather than forked from a GPL project.

State today:

  • The driver is code-complete, bundle id com.deemwar.windowctl.audio.
  • It is signed with a hardened runtime and a secure timestamp.
  • A notarization script (notarytool submit --wait + stapler staple) is ready.
  • coreaudiod will not load it. It rejects signatures that are not Developer ID: spctl -a -t install rejects both the Apple Development and the Apple Distribution signature. The unblock is a Developer ID Application certificate plus notarization.
Terminal window
device-bridge install audio # copies to /Library/Audio/Plug-Ins/HAL, restarts coreaudiod
device-bridge uninstall audio

install audio needs sudo and restarts coreaudiod; it is an explicit verb precisely because it is a privileged, system-wide change. Until the certificate lands, the device will not appear in audio list.

Windows has no user-mode virtual-microphone API at all. A true virtual mic there needs a kernel-mode AVStream driver, an EV code-signing certificate and Microsoft attestation signing — weeks of work plus ongoing overhead, wildly out of proportion for a test tool. ADR 0009 defers it indefinitely in favour of a user-mode audio router, and will only be revisited when a named target both rejects a router-backed mic and is important enough to justify the cost. None of the Windows audio path is implemented yet regardless.