Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fmt

Richie McIlroyf7b7a9b789b0
diff --git a/crates/audio/src/latency.rs b/crates/audio/src/latency.rs
index 79a19723a..e6c4d52cf 100644
--- a/crates/audio/src/latency.rs
+++ b/crates/audio/src/latency.rs
@@ -597,8 +597,9 @@ mod macos {
sample_rate as f64
};
- let device_latency_total_frames =
- device_latency_frames as u64 + safety_offset_frames as u64 + stream_latency_frames as u64;
+ let device_latency_total_frames = device_latency_frames as u64
+ + safety_offset_frames as u64
+ + stream_latency_frames as u64;
let device_latency_secs = device_latency_total_frames as f64 / effective_rate;
let buffer_latency_secs = buffer_frames as f64 / effective_rate;
diff --git a/crates/editor/src/audio.rs b/crates/editor/src/audio.rs
index c34fc85fb..133b8c550 100644
--- a/crates/editor/src/audio.rs
+++ b/crates/editor/src/audio.rs
@@ -1,13 +1,13 @@
use cap_audio::{
- cast_f32_slice_to_bytes, AudioData, AudioRendererTrack, FromSampleBytes, StereoMode,
+ AudioData, AudioRendererTrack, FromSampleBytes, StereoMode, cast_f32_slice_to_bytes,
};
use cap_media::MediaError;
use cap_media_info::AudioInfo;
use cap_project::{AudioConfiguration, ClipOffsets, ProjectConfiguration, TimelineConfiguration};
-use ffmpeg::{format as avformat, frame::Audio as FFAudio, software::resampling, ChannelLayout};
+use ffmpeg::{ChannelLayout, format as avformat, frame::Audio as FFAudio, software::resampling};
use ringbuf::{
- traits::{Consumer, Observer, Producer},
HeapRb,
+ traits::{Consumer, Observer, Producer},
};
use std::sync::Arc;
@@ -221,11 +221,7 @@ impl AudioRenderer {
f32::NEG_INFINITY
} else {
let g = t.gain(&project.audio);
- if g < -30.0 {
- f32::NEG_INFINITY
- } else {
- g
- }
+ if g < -30.0 { f32::NEG_INFINITY } else { g }
},
stereo_mode: t.stereo_mode(&project.audio),
offset: (t.offset(&offsets) * Self::SAMPLE_RATE as f32) as isize,
diff --git a/crates/project/src/meta.rs b/crates/project/src/meta.rs
index a8e44e22a..e7ea66d85 100644
--- a/crates/project/src/meta.rs
+++ b/crates/project/src/meta.rs
@@ -10,8 +10,8 @@ use std::{
use tracing::{debug, info, warn};
use crate::{
- cursor::SHORT_CURSOR_SHAPE_DEBOUNCE_MS, CaptionsData, CursorEvents, CursorImage,
- ProjectConfiguration, XY,
+ CaptionsData, CursorEvents, CursorImage, ProjectConfiguration, XY,
+ cursor::SHORT_CURSOR_SHAPE_DEBOUNCE_MS,
};
#[derive(Debug, Clone, Serialize, Deserialize, Type)]
diff --git a/crates/recording/src/sync_calibration.rs b/crates/recording/src/sync_calibration.rs
index 236738c54..f2af1f5d5 100644
--- a/crates/recording/src/sync_calibration.rs
+++ b/crates/recording/src/sync_calibration.rs
@@ -1,5 +1,5 @@
use cap_audio::{
- calculate_frame_motion_score, CalibrationStore, DeviceSyncCalibration, SyncAnalyzer,
+ CalibrationStore, DeviceSyncCalibration, SyncAnalyzer, calculate_frame_motion_score,
};
use std::path::{Path, PathBuf};
use tracing::{debug, info, warn};