Merge pull request #382 from dansgithubuser/master
fix sample rate range assertion
This commit is contained in:
commit
f3e7c46205
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue