Files
sqlpxc b3362bbecc feat(windows,audio,proto): plug the controller's microphone into Windows hosts through usbip-win2 (#151)
Windows hosts no longer use Steam Streaming Microphone (Steam had to be
installed, its driver was installed from Steam's files with administrator
rights, and its two sides usually needed exclusive mode). The controller's
microphone is now Airhand Microphone, a USB Audio Class 1.0 microphone
served by airhand-dock 0.3.0 and plugged through usbip-win2, like the
gamepads: Windows drives it with its own usbaudio.sys, so nothing else is
installed, no administrator rights, no exclusive mode, no sound settings
changed, and it has the same name on every platform.

- host/mic/usb.rs: plugged on the first "microphone on" of a session and
  ready once Windows has published its recording device (found by its
  interface name). The first time a computer sees it, Windows sets it up
  and briefly disables the recording device; the host waits for it to
  come back (about 6 s instead of 1 s). Turning the microphone off or
  switching connections doesn't unplug it, so programs that chose it don't
  fall back to the computer's own microphone; it is unplugged when every
  session that turned it on has ended (at once for a normal end, after
  30 s without a reconnect otherwise). A fixed USB serial keeps programs'
  choice and the default device setting.
- host/dock.rs: one airhand-dock Dock per process for gamepads and the
  microphone.
- proto: MicState::NoDriver (usbip-win2 missing). NoDevice, SteamMissing
  and SetupFailed are only sent by older Windows hosts; the console keeps
  their texts.
- The render loop's opener now says why it can't open yet (no driver,
  preparing) and polls faster while preparing; device format parsing for
  WASAPI is gone, as are the zip and tempfile dependencies.
- Installer, usbip-win2 README and docs describe usbip-win2 as the gamepad
  and microphone driver.
- Tests: mic_reaches_airhand_microphone records a 1 kHz tone back through
  the real device (AIRHAND_TEST_MIC_SERIAL simulates a first plug);
  e2e_mic uses it on Windows.
2026-12-04 16:35:27 +08:00
..