Repository navigation
Stop Linux mic detection from counting Anarlog's own ALSA stream - #8286
vitorhmcorreia wants to merge 3 commits into
Conversation
On PipeWire, the app's microphone capture is listed as "PipeWire ALSA [anarlog]" (PulseAudio's ALSA plugin uses "ALSA plug-in [anarlog]"), with no process binary, so is_self_app never matched it and the mic tracker treated Anarlog as another app using the microphone. Unwrap that client name and compare the process name with the existing self names (hyphens as spaces, so anarlog-nightly matches "anarlog nightly"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
anarlog-dev normalizes to "anarlog dev", which was missing from the self names, so a development build still saw its own microphone stream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Context: On Linux with PipeWire, Anarlog's own microphone capture is listed by PulseAudio as a source output whose
application.nameisPipeWire ALSA [anarlog]and which has noapplication.process.binary, solinux::list_mic_using_appsreports it with both id and name set to that string. On desktop 1.4.36 (Ubuntu 26.04, PipeWire 1.6.2), the journal showsdetected event=MicStarted([InstalledApp { id: "PipeWire ALSA [anarlog]", ... }])right after a recording starts, andmic_detected app_id=PipeWire ALSA [anarlog] threshold_secs=15once the threshold passes.Intention:
is_self_apponly matches exact self names, bundle IDs and.apppaths, so Anarlog's own recording is tracked as another app using the microphone. It then shows up in every mic-app snapshot, for example the oneconfirmAutoStoptakes. It isn't offered in the exclusion list either (that list shows "Anarlog"), so users can't exclude it.Direction: Unwrap the ALSA client names that PipeWire (
PipeWire ALSA [<process>]) and PulseAudio's ALSA plugin (ALSA plug-in [<process>]) give, and compare the process name with the existingSELF_APP_NAMES, reading hyphens as spaces soanarlog-nightlymatchesanarlog nightly. Other apps' wrapped names, such asPipeWire ALSA [teams], are unaffected.Demo
N/A: a filter change with no UI. Before and after is the journal line above disappearing once the stream is recognized.
Verification
cargo test -p detect --features list,mic --lib: 110 passed, including new cases inis_self_app_matches_only_anarlog_identities(own stream in PipeWire and PulseAudio form, the nightly name, and non-matches[teams],[charm]and trailing text).cargo clippy -p detect --features list,mic --lib --tests: no findings in the changed file;rustfmt --edition 2024 --checkclean.pactl list source-outputsand the app's journal.🤖 Generated with Claude Code
Summary by cubic
Stops Linux mic detection from counting Anarlog's own ALSA stream as another app using the microphone, and also recognizes the dev build's stream.
On Linux with PipeWire, Anarlog's capture appears as
PipeWire ALSA [anarlog](orALSA plug-in [anarlog]on PulseAudio) with no process binary, sois_self_appnever matched it and the mic tracker treated it as another app using the mic.is_self_appnow unwraps those ALSA client names and compares the process name against the self app names, treating hyphens as spaces soanarlog-nightlymatchesanarlog nightly. The dev build'sanarlog-devname is now included asanarlog devso a development build also recognizes its own stream. Other apps' wrapped names, such asPipeWire ALSA [teams], are unaffected.Written for commit e742722. Summary will update on new commits.