Adds --capture-mic/--mic-output for a second, independently-captured audio
track (mic vs system, written to separate outputs to avoid interleaving
corruption). Embeds Info.plist at link time so the binary carries a stable
CFBundleIdentifier and the usage-description keys TCC requires, and adds
scripts/build-signed.sh + scripts/create-signing-identity.sh so a rebuilt
binary keeps the same signing identity instead of losing granted
permissions on every rebuild.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace Data/AudioPacket allocations with raw pointer callbacks through
the entire audio pipeline. Ring buffer hands out direct pointers (or
linearizes into a pre-allocated scratch buffer on wrap-around), converter
accepts/emits pointers via its cached buffers, and output handler writes
to stdout via write(2) with EINTR handling.
Remove AudioPacket (dead code), --flush flag (no-op with raw write(2)).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only one append path exists now: append(from:count:), which is what the
IO proc callback uses. The Data-based overload had no callers in source
and added a dead code path to maintain.
Also resolves CoreAudio.AudioBuffer name collision in tests via typealias.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace Swift Array<UInt8> ring buffer with UnsafeMutableRawPointer to
eliminate COW ref-count checks on every write/read
- Add append(from:count:) to copy directly from Core Audio buffer pointer
into the ring buffer, removing the per-callback Data heap allocation
- Pre-allocate AVAudioPCMBuffer pair in AudioFormatConverter and reuse
across transform() calls (lazy init, capacity-checked)
- Fix float-to-int truncation in output frame count calculation (ceil)
- Add comprehensive AudioBuffer test suite (12 tests) including proper
wrap-around coverage for both append and read paths
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>