Also export constructor for SupportedStreamConfig
This is related to #535.
This commit is contained in:
parent
411c671c33
commit
493a0904f3
1 changed files with 14 additions and 0 deletions
14
src/lib.rs
14
src/lib.rs
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue