cargo fmt
This commit is contained in:
parent
919722a785
commit
7eb45bca6f
|
@ -525,7 +525,11 @@ impl SupportedStreamConfigRange {
|
||||||
///
|
///
|
||||||
/// **panic!**s if the given `sample_rate` or the give `buffer_size` is outside the range specified within this
|
/// **panic!**s if the given `sample_rate` or the give `buffer_size` is outside the range specified within this
|
||||||
/// `SupportedStreamConfigRange` instance.
|
/// `SupportedStreamConfigRange` instance.
|
||||||
pub fn with_sample_rate_and_buffer_size(self, sample_rate: SampleRate, buffer_size: BufferSize) -> SupportedStreamConfig {
|
pub fn with_sample_rate_and_buffer_size(
|
||||||
|
self,
|
||||||
|
sample_rate: SampleRate,
|
||||||
|
buffer_size: BufferSize,
|
||||||
|
) -> SupportedStreamConfig {
|
||||||
assert!(self.min_sample_rate <= sample_rate && sample_rate <= self.max_sample_rate);
|
assert!(self.min_sample_rate <= sample_rate && sample_rate <= self.max_sample_rate);
|
||||||
assert!(self.buffer_size.min <= buffer_size && buffer_size <= self.buffer_size.max);
|
assert!(self.buffer_size.min <= buffer_size && buffer_size <= self.buffer_size.max);
|
||||||
if self.buffer_size.requires_power_of_two {
|
if self.buffer_size.requires_power_of_two {
|
||||||
|
@ -533,9 +537,9 @@ impl SupportedStreamConfigRange {
|
||||||
}
|
}
|
||||||
SupportedStreamConfig {
|
SupportedStreamConfig {
|
||||||
channels: self.channels,
|
channels: self.channels,
|
||||||
|
sample_rate: self.max_sample_rate,
|
||||||
sample_format: self.sample_format,
|
sample_format: self.sample_format,
|
||||||
buffer_size,
|
buffer_size,
|
||||||
sample_rate: self.max_sample_rate,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue