Skip to content

Commit

Permalink
specify sample rate
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Feb 23, 2025
1 parent 512a1ce commit 469d7ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/save_audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub fn save_audio_file_to_disk(mut audio_bytes: Vec<u8>, device_config: DeviceCo
let duration_seconds = audio_bytes[12..].len() as f32 / sample_rate as f32 / 2.0;
let duration = format!("duration={}", duration_seconds);

let sr = format!("sr={}", sample_rate);
let sr = format!("sample_rate={}", sample_rate);

This comment has been minimized.

Copy link
@hardiesoft

hardiesoft Feb 23, 2025

Member

Just to be pedantic, can we match the camelCase used by the other metadata keys?

let is_test_recording = duration_seconds < 3.0;
let mut args = Vec::from([
"-i",
Expand Down
2 changes: 1 addition & 1 deletion src/save_cptv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn save_cptv_file_to_disk(mut cptv_bytes: Vec<u8>, output_dir: &str) {
// let mut new_cptv_bytes = Vec::new();
// encoder.read_to_end(&mut new_cptv_bytes).unwrap();

// // Only use the re-compressed file if it actually got smaller.
// Only use the re-compressed file if it actually got smaller.
// if new_cptv_bytes.len() > cptv_bytes.len() {
// new_cptv_bytes = cptv_bytes;
// }
Expand Down

0 comments on commit 469d7ad

Please sign in to comment.