We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f29d8f3 commit 090d572Copy full SHA for 090d572
src/lib.rs
@@ -137,10 +137,12 @@ impl AtomicF64 {
137
#[track_caller]
138
#[inline(always)]
139
pub(crate) fn assert_valid_sample_rate(sample_rate: f32) {
140
+ // Arbitrary cutoffs defined as:
141
+ // min_sample_rate = min_required_in_spec / 2
142
+ // max_sample_rate = max_required_in_spec * 2
143
let min_sample_rate = 4_000.;
144
let max_sample_rate = 192_000.;
- // 1000 Hertz is a just a random cutoff, but it helps a if someone accidentally puts a
- // timestamp in the sample_rate variable
145
+
146
assert!(
147
sample_rate >= min_sample_rate && sample_rate <= max_sample_rate,
148
"NotSupportedError - Invalid sample rate: {:?}, should be in the range [{:?}, {:?}]",
0 commit comments