Compare commits

..

No commits in common. "471f5a595d05245d6904fb14c61c655e912baa8c" and "2f11505b8b1c55cbbb93146bb9ba84d58d6250d0" have entirely different histories.

2 changed files with 5 additions and 14 deletions

View File

@ -240,7 +240,7 @@ impl Ffmpeg {
.to_string();
let mut ffmpeg_command = FfmpegCommand::new();
ffmpeg_command.format("dshow")
.input(format!("audio={}", &self.audio_output_id))
.input(format!("audio={}", &self.audio_input_id))
.format("ogg");
// Remove metadate
ffmpeg_command.args(["-map_metadata", "-1"]);
@ -579,9 +579,7 @@ impl Ffmpeg {
.to_string();
let mut ffmpeg_command = FfmpegCommand::new();
ffmpeg_command.format("dshow")
.input(format!("audio=\"{}\"", &self.audio_input_id.active_text()
.ok_or_else(|| anyhow!("Failed to get audio input source."))?)
)
.input(format!("audio={}", &self.audio_input_id))
.format("ogg");
// Disable bitrate if value is zero
if self.audio_record_bitrate.value() as u16 > 0 {
@ -614,7 +612,7 @@ impl Ffmpeg {
.ok_or_else(|| anyhow!("Not exiting the input audio recording process successfully."))?
.borrow_mut()
.quit()?;
}
}
Ok(())
}
@ -628,7 +626,7 @@ impl Ffmpeg {
.to_string();
let mut ffmpeg_command = FfmpegCommand::new();
ffmpeg_command.format("dshow")
.input(format!("audio=\"{}\"", &self.audio_output_id))
.input(format!("audio={}", &self.audio_input_id))
.format("ogg");
// Remove metadate
ffmpeg_command.args(["-map_metadata", "-1"]);

View File

@ -210,7 +210,6 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
#[cfg(any(target_os = "freebsd", target_os = "linux"))]
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));
for (id, audio_source) in sources_descriptions.iter().enumerate() {
audio_source_combobox.append(Some(id.to_string().as_str()), audio_source);
@ -986,7 +985,6 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
let _video_switch = video_switch.clone();
let mut _ffmpeg_record_interface = ffmpeg_record_interface.clone();
stop_button.connect_clicked(move |_| {
let mut show_play = true;
_record_time_label.set_visible(false);
stop_timer(_record_time_label.clone());
if _audio_input_switch.is_active() {
@ -1002,7 +1000,6 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
}
enable_input_widgets(input_widgets.clone());
record_button.show();
show_play = false;
_stop_button.hide();
let text_buffer = TextBuffer::new(None);
text_buffer.set_text(&format!("{}", error));
@ -1024,7 +1021,6 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
}
enable_input_widgets(input_widgets.clone());
record_button.show();
show_play = false;
_stop_button.hide();
let text_buffer = TextBuffer::new(None);
text_buffer.set_text(&format!("{}", error));
@ -1046,7 +1042,6 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
}
enable_input_widgets(input_widgets.clone());
record_button.show();
show_play = false;
_stop_button.hide();
let text_buffer = TextBuffer::new(None);
text_buffer.set_text(&format!("{}", error));
@ -1062,9 +1057,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
enable_input_widgets(input_widgets.clone());
record_button.show();
_stop_button.hide();
if show_play {
_play_button.show();
}
_play_button.show();
});
// Delay window button