Add constructor for SupportedStreamConfigRange

This is related to #535.
This commit is contained in:
yamadapc 2022-07-06 19:06:08 +10:00 • committed by est31
parent 32cee3949b
commit 411c671c33

View file

@ -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
}