Per-application audio + your microphone → one virtual microphone, on Windows.
MicTap captures the sound of the applications you tick (not the whole desktop), optionally mixes your physical microphone into it, and writes the result to a virtual audio cable. Any app that lets you choose a microphone — Discord, KOOK, TeamSpeak, Teams, Zoom, OBS, a browser tab — picks it up as a regular mic.
Most "virtual microphone" tools route everything the machine plays. That is the wrong unit when you want music from one player inside a voice call while a game, a browser or a notification stays out of it.
MicTap uses the Windows Application Loopback API (ActivateAudioInterfaceAsync +
VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK), so the capture scope is a process ID and its process
tree — enough to cover multi-process apps such as browsers, Electron players and music clients.
| App-scoped capture | Tick the exact apps; child processes and helper renderers are included, the rest of the desktop is not. |
| Multi-app mixing | Up to eight applications can be ticked at once — a music player plus a browser plus a game — and are summed into the same output on one clock. |
| Live mixing with a real mic | Application audio and a physical microphone are mixed in one engine, on one clock, so the two never drift apart. |
| Independent lanes | Start/stop app audio and microphone separately; adjust each gain 0–200 %. |
| Single executable | UI and audio engine in one Win32 binary. No .NET runtime, no PowerShell, no installer, no background service. |
| Bilingual UI | Chinese and English, switchable at runtime and remembered in settings.ini. |
| High-DPI aware | Per-Monitor V2; layouts are computed from logical coordinates. |
| Grouped process list | Processes sharing one executable are folded into a single row (Microsoft Edge ×7); the row captures the tree root, so renderers and helpers come along. |
| PID reuse guard | The target is re-verified by executable path and process creation time before capture starts. |
| Honest failure | A dead or vanished target reports an error instead of silently streaming silence. |
- Windows 10 build 20348 or newer (Windows 11 recommended) — the process loopback API is not available on earlier builds.
- A virtual audio cable. VB-CABLE (free) is what this project is tested against:
vb-audio.com/Cable → run
VBCABLE_Setup_x64.exeas administrator, then reboot. You get:- playback side
CABLE Input (VB-Audio Virtual Cable)← MicTap writes here - recording side
CABLE Output (VB-Audio Virtual Cable)← your voice app reads here
- playback side
- Install VB-CABLE and reboot.
- Download
MicTap.exefrom Releases, put it in a normal folder such as%LOCALAPPDATA%\Programs\MicTap\, and run it. - In 01 App audio, tick one or more apps in the Source list (the checkboxes), set a volume, click Start App Audio. (Optional) in 02 Microphone, pick your mic and click Start Microphone.
- In Discord / KOOK / your meeting app: microphone =
CABLE Output (VB-Audio Virtual Cable), and turn off its automatic gain control and noise suppression.
- Entries marked
●are currently rendering audio. Show inactive processes lists everything else so you can pick an app that is not playing right now. - Tick several apps to mix them (up to eight). The ticks survive a restart — each one is remembered by executable path and process creation time, so a recycled PID never re-binds to the wrong app.
- Both lanes are independent; either one alone works.
- Detect devices re-scans for the cable and refreshes the microphone list, Sound settings opens the Windows recording panel, Open logs shows the diagnostic folder.
- A source or gain can only be changed while that lane is stopped — this keeps the capture graph consistent instead of swapping devices underneath a running stream.
ticked app #1 (PID + child tree) ─┐
ticked app #2 (PID + child tree) ─┤ Application Loopback, 48 kHz / stereo / float32
… up to eight ─┤
▼
physical microphone ──► capture client ──► deque<float> ──┐
├─► per-frame sum ─► soft limiter ─► IAudioRenderClient
│ (CABLE Input)
│ │
▼ ▼
CABLE Output ─► voice app
- One engine thread polls every ticked capture client plus the microphone, mixes them on a single sample clock and writes to the render client; the UI thread only flips atomic flags.
- Capture and render are opened in shared mode with
AUTOCONVERTPCM, so Windows owns sample rate conversion and the app never hand-rolls a resampler. - A prefetch high-water mark (~50 ms) and a drop threshold (~150 ms) bound latency and prevent buffer drift; the write side is only opened once there is data to write.
- The asynchronous activation handler implements
IActivateAudioInterfaceCompletionHandlerandIAgileObject, keeps theGetActivateResultHRESULT separate from the activation HRESULT, and keeps its objects alive across a wait timeout.
More detail: docs/ARCHITECTURE.md.
MicTap.exe --dump write the process discovery result to logs\discovery.txt
MicTap.exe --route <PID[,PID…]> [seconds] [mic index]
route one or more apps for N seconds, report to logs\route-test.txt
--route writes a report such as:
pid=37932,37964 cable_input=FOUND lanes=2
captured_frames=276480 peak=0.791960 queued=0 open=1
lane1_frames=276480 lane1_peak=0.791960 lane1_open=1
open=1 means the capture stream is live, peak proves non-silent audio is flowing,
queued is the current buffer depth in frames.
Only a C++17 compiler and windres are needed (w64devkit is what the release is built with):
build.cmd :: -> build\MicTap.exe
build.cmd debug :: console subsystem, stderr stays visibleor by hand:
windres -I src src\MicTap.rc -O coff -o build\MicTap.res
g++ src\MicTap.cpp build\MicTap.res -std=c++17 -O2 -static -mwindows -municode ^
-lole32 -luuid -loleaut32 -lmmdevapi -lshell32 -lgdi32 -luser32 -o build\MicTap.exe| Symptom | Cause / fix |
|---|---|
CABLE Output missing in the app list |
VB-CABLE not installed, or the machine was not rebooted after installing it. |
| The list only shows a handful of processes | The program is running from a directory with restricted process visibility (sandboxed/roaming-profile folders). Move MicTap.exe to %LOCALAPPDATA%\Programs\MicTap\. |
| Lane runs but the peer hears nothing | The voice app is still using the physical mic — select CABLE Output. |
| Captured audio is silence | The target app is paused, muted in the Windows mixer, or uses an exclusive-mode/DRM-protected output. |
| Choppy audio | Set the CABLE control panel sample rate to 48 kHz and keep both lanes at shared mode. |
| Everything is duplicated/echoing | The voice app's own monitoring or a second routing tool is also injecting audio. |
More: docs/TROUBLESHOOTING.md.
- Windows 10 build 20348+ only.
- Exclusive-mode and DRM-protected streams may capture as silence.
- The capture is the application's post-mix output (after its own effects), not a raw track.
- A single virtual cable means one mixed program; per-app cables need one cable per stream.
MicTap makes no network requests, ships no telemetry and writes nothing outside its own folder
(settings.ini, logs\).
MIT © 2026 YG
- Microsoft Application Loopback sample — the reference for process-scoped WASAPI capture.
- VB-Audio Virtual Cable — the virtual device this project targets (separate donationware product, not bundled here).
