Skip to content

Commit dff5c68

Browse files
committed
Update incorrect assert messages, fixes #540
1 parent cee9abd commit dff5c68

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl AtomicF64 {
132132
/// # Panics
133133
///
134134
/// This function will panic if:
135-
/// - the given sample rate is lower than 4000 or greater than 192000
135+
/// - the given sample rate is lower than 2000 or greater than 384000
136136
///
137137
#[track_caller]
138138
#[inline(always)]

src/node/channel_merger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub(crate) fn assert_valid_number_of_channels(number_of_channels: usize) {
3232
///
3333
/// # Panics
3434
///
35-
/// This function panics if given count is greater than 2
35+
/// This function panics if given count is not equal to 1
3636
///
3737
#[track_caller]
3838
#[inline(always)]

src/node/panner.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl PannerNode {
417417
);
418418
assert!(
419419
max_distance > 0.,
420-
"RangeError - maxDistance must be positive"
420+
"RangeError - maxDistance must be strictly positive"
421421
);
422422
assert!(
423423
rolloff_factor >= 0.,
@@ -574,7 +574,10 @@ impl PannerNode {
574574
///
575575
/// Panics if the provided value is negative.
576576
pub fn set_max_distance(&mut self, value: f64) {
577-
assert!(value > 0., "RangeError - maxDistance must be positive");
577+
assert!(
578+
value > 0.,
579+
"RangeError - maxDistance must be strictly positive"
580+
);
578581
self.max_distance = value;
579582
self.registration
580583
.post_message(ControlMessage::MaxDistance(value));

0 commit comments

Comments
 (0)