Skip to content

Add unprocessed audio source (raw mic for RTA / measurement) - #185

Merged
teamclouday merged 1 commit into
teamclouday:mainfrom
emdaitaj:unprocessed-audio-source
Oct 18, 2026
Merged

teamclouday merged 1 commit into
teamclouday:mainfrom
emdaitaj:unprocessed-audio-source

Conversation

@emdaitaj

Copy link
Copy Markdown
Contributor

Summary

Adds an Unprocessed option to the Android Audio Source setting. It records the raw microphone signal, with no automatic gain control, noise suppression or voice EQ. That makes AndroidMic usable as a measurement mic for real-time analyzers (RTA), SPL meters and room-EQ tools, with no root and no other changes to the phone.

Changes

  • AudioSource.Unprocessed maps to MediaRecorder.AudioSource.UNPROCESSED (API 24+). On API 23 it uses VOICE_RECOGNITION instead, which the CDD requires to have AGC and noise reduction disabled.
  • MicAudioManager:
    • checks AudioManager.PROPERTY_SUPPORT_AUDIO_SOURCE_UNPROCESSED. On devices that don't support it, UNPROCESSED "behaves like DEFAULT" (processed), so we switch to VOICE_RECOGNITION. We also switch if the recorder fails to initialize with UNPROCESSED.
    • explicitly disables any AutomaticGainControl, NoiseSuppressor and AcousticEchoCanceler that the vendor attached to the session, and releases them on shutdown.
  • ForegroundService adds a note to the "Microphone has started to record" message when it had to fall back, so the user knows they aren't getting raw audio.
  • New string unprocessed_not_supported (en, fr, zh-CN).

Other audio sources behave exactly as before. The new enum value goes at the end, so saved preferences aren't affected.

Testing

  • ./gradlew assembleRelease builds.

For accurate RTA readings, users should also turn off denoise and post-processing effects in the PC app.

🤖 Generated with Claude Code

Records the raw microphone signal (no AGC, noise suppression or voice EQ)
so the phone can be used as a measurement mic for RTA / SPL tools without
root or other phone modifications.

- maps to MediaRecorder.AudioSource.UNPROCESSED on API 24+
- falls back to VOICE_RECOGNITION when the device doesn't advertise
  PROPERTY_SUPPORT_AUDIO_SOURCE_UNPROCESSED, when the recorder fails to
  initialize, or on API 23
- explicitly disables vendor AGC / NS / AEC effects on the session
- tells the user when the fallback is used

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamclouday

Copy link
Copy Markdown
Owner

Thanks for the PR!

@teamclouday
teamclouday merged commit f473a41 into teamclouday:main Oct 18, 2026
4 checks passed
ID-VerNe pushed a commit to ID-VerNe/AndroidMic that referenced this pull request Nov 16, 2026
…urce

Add unprocessed audio source (raw mic for RTA / measurement)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants