Add constructor for SupportedStreamConfigRange
This is related to #535.
This commit is contained in:
parent
32cee3949b
commit
411c671c33
1 changed files with 16 additions and 0 deletions
16
src/lib.rs
16
src/lib.rs
|
|
@ -536,6 +536,22 @@ impl Data {
|
|||
}
|
||||
|
||||
impl SupportedStreamConfigRange {
|
||||
pub fn new(
|
||||
channels: ChannelCount,
|
||||
min_sample_rate: SampleRate,
|
||||
max_sample_rate: SampleRate,
|
||||
buffer_size: SupportedBufferSize,
|
||||
sample_format: SampleFormat,
|
||||
) -> Self {
|
||||
Self {
|
||||
channels,
|
||||
min_sample_rate,
|
||||
max_sample_rate,
|
||||
buffer_size,
|
||||
sample_format,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn channels(&self) -> ChannelCount {
|
||||
self.channels
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue