From bf276e7de6a00e7a6a7281e93b440480d7514c6e Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 17 Mar 2020 23:16:04 -0400 Subject: [PATCH] fix sample rate range assertion --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index abea8ea..da10a9f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -356,7 +356,7 @@ impl SupportedStreamConfigRange { /// **panic!**s if the given `sample_rate` is outside the range specified within this /// `SupportedStreamConfigRange` instance. pub fn with_sample_rate(self, sample_rate: SampleRate) -> SupportedStreamConfig { - assert!(sample_rate <= self.min_sample_rate && sample_rate <= self.max_sample_rate); + assert!(self.min_sample_rate <= sample_rate && sample_rate <= self.max_sample_rate); SupportedStreamConfig { channels: self.channels, sample_format: self.sample_format,