feat(audio): wire MicBridge so recordings include the user's voice
This commit is contained in:
@@ -296,17 +296,27 @@ pub async fn start_recording(
|
||||
// back to loopback-only (the mixer forwards loopback alone once its sink
|
||||
// drops).
|
||||
let (capture, mic_capture) = if settings.microphone_enabled {
|
||||
// The mixer sums both streams for the live transcript; the bridge carries
|
||||
// the mic into the loopback thread so the recorded WAV holds both sides
|
||||
// at native quality (FR-CAP-7).
|
||||
let bridge = crate::audio::MicBridge::shared();
|
||||
let (loop_sink, mic_sink) = crate::audio::spawn_mixer(frame_tx);
|
||||
let capture = WasapiCapture
|
||||
.start(
|
||||
.start_loopback_recording(
|
||||
&wav_path,
|
||||
settings.audio_output_device.as_deref(),
|
||||
loop_sink,
|
||||
event_tx.clone(),
|
||||
bridge.clone(),
|
||||
)
|
||||
.map_err(|e| WaError::new("audio", e.to_string()))?;
|
||||
let mic = WasapiCapture
|
||||
.start_microphone(settings.audio_input_device.as_deref(), mic_sink, event_tx)
|
||||
.start_microphone_recording(
|
||||
settings.audio_input_device.as_deref(),
|
||||
mic_sink,
|
||||
event_tx,
|
||||
bridge,
|
||||
)
|
||||
.map_err(|e| tracing::warn!("microphone capture unavailable: {e}"))
|
||||
.ok();
|
||||
(capture, mic)
|
||||
|
||||
Reference in New Issue
Block a user