fix sample rate range assertion

This commit is contained in:
Dan 2020-03-17 23:16:04 -04:00
parent aac04e7263
commit bf276e7de6
1 changed files with 1 additions and 1 deletions

View File

@ -356,7 +356,7 @@ impl SupportedStreamConfigRange {
/// **panic!**s if the given `sample_rate` is outside the range specified within this /// **panic!**s if the given `sample_rate` is outside the range specified within this
/// `SupportedStreamConfigRange` instance. /// `SupportedStreamConfigRange` instance.
pub fn with_sample_rate(self, sample_rate: SampleRate) -> SupportedStreamConfig { 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 { SupportedStreamConfig {
channels: self.channels, channels: self.channels,
sample_format: self.sample_format, sample_format: self.sample_format,