mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2025-04-02 07:44:54 +03:00
fix mic record
This commit is contained in:
parent
31ea054174
commit
1cd925a0bb
@ -579,7 +579,9 @@ impl Ffmpeg {
|
|||||||
.to_string();
|
.to_string();
|
||||||
let mut ffmpeg_command = FfmpegCommand::new();
|
let mut ffmpeg_command = FfmpegCommand::new();
|
||||||
ffmpeg_command.format("dshow")
|
ffmpeg_command.format("dshow")
|
||||||
.input(format!("audio={}", &self.audio_input_id))
|
.input(format!("audio=\"{}\"", &self.audio_input_id.active_text()
|
||||||
|
.ok_or_else(|| anyhow!("Failed to get audio input source."))?)
|
||||||
|
)
|
||||||
.format("ogg");
|
.format("ogg");
|
||||||
// Disable bitrate if value is zero
|
// Disable bitrate if value is zero
|
||||||
if self.audio_record_bitrate.value() as u16 > 0 {
|
if self.audio_record_bitrate.value() as u16 > 0 {
|
||||||
@ -612,7 +614,7 @@ impl Ffmpeg {
|
|||||||
.ok_or_else(|| anyhow!("Not exiting the input audio recording process successfully."))?
|
.ok_or_else(|| anyhow!("Not exiting the input audio recording process successfully."))?
|
||||||
.borrow_mut()
|
.borrow_mut()
|
||||||
.quit()?;
|
.quit()?;
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,6 +210,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
|||||||
#[cfg(any(target_os = "freebsd", target_os = "linux"))]
|
#[cfg(any(target_os = "freebsd", target_os = "linux"))]
|
||||||
let audio_output_source: String = audio_output_source().unwrap_or_else(|_| String::new());
|
let audio_output_source: String = audio_output_source().unwrap_or_else(|_| String::new());
|
||||||
|
|
||||||
|
#[cfg(any(target_os = "freebsd", target_os = "linux"))]
|
||||||
audio_source_combobox.append(Some("default"), &get_bundle("audio-input", None));
|
audio_source_combobox.append(Some("default"), &get_bundle("audio-input", None));
|
||||||
for (id, audio_source) in sources_descriptions.iter().enumerate() {
|
for (id, audio_source) in sources_descriptions.iter().enumerate() {
|
||||||
audio_source_combobox.append(Some(id.to_string().as_str()), audio_source);
|
audio_source_combobox.append(Some(id.to_string().as_str()), audio_source);
|
||||||
|
Loading…
Reference in New Issue
Block a user