Skip to content

feat: Add microphone volume setting and microphone testing - #2

Merged
RisDN merged 1 commit into
catninth:mainfrom
content:main
Nov 4, 2026
Merged

RisDN merged 1 commit into
catninth:mainfrom
content:main

Conversation

@content

@content content commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Add microphone volume setting and microphone test

What

  • New Microphone volume slider (0–200%, default 100%) under Microphone device. It is shown only when the microphone is not Off.
  • New Microphone test row: plays the selected microphone through the speakers at the chosen volume, with a level meter, similar to Discord's voice test.

How

  • micVolume is a new setting (settings.rs). It is validated to 0–200, clamped on load, and defaults to 100 for existing settings files.
  • The engine applies it with obs_source_set_volume, both when the microphone source is created and live on save (set_mic_volume, called from apply_mic_settings). It does not touch the pipeline fingerprint, so saving does not rebuild the buffer.
  • The test (MicTest.tsx) runs in the WebView with getUserMedia and Web Audio (gain, analyser). The CSP and the Tauri config are unchanged.
  • Hungarian and English strings are added, and test fixtures are updated.

Limitations

  • The test simulates the gain in the WebView. It does not play back the real OBS recording chain.
  • The selected device is matched to the browser device by its name. If no name matches, the test reports that the microphone is unavailable. It does not fall back to another microphone.
  • Playback through speakers can cause feedback; the hint recommends headphones.

Testing

  • tsc --noEmit, vitest (74/74), cargo test (90/90) and vite build all pass.
  • Manually verified features in the running app (npm run tauri dev):
    • The slider audibly changes the saved clip's microphone volume
    • The test plays back with the chosen microphone
    • The WebView2 microphone permission prompt behaves correctly

@RisDN
RisDN merged commit c54ac60 into catninth:main Nov 4, 2026
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