Also export constructor for SupportedStreamConfig

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

View file

@ -331,6 +331,20 @@ pub struct OutputCallbackInfo {
}
impl SupportedStreamConfig {
pub fn new(
channels: ChannelCount,
sample_rate: SampleRate,
buffer_size: SupportedBufferSize,
sample_format: SampleFormat,
) -> Self {
Self {
channels,
sample_rate,
buffer_size,
sample_format,
}
}
pub fn channels(&self) -> ChannelCount {
self.channels
}