Feature Request: read default buffer size from `Stream`, and/or query device's preferred buffer size
With ASIO the driver will report a preferred buffer size, and I'm guessing this is what gets used when the default buffer size is chosen. It'd be nice to know what this value is before starting a stream.
Alternatively, one can use BufferSize::Fixed, but would need a way to query what that preferred buffer size is for some Host and Device.
Something like:
enum PreferredBufferSize {
/// Device doesn't provide this information
Unknown,
/// Device can provide this information
Fixed(usize),
}
let preferred_input_size = device.preferred_input_buffer_size();
Small correction: it seems like the "default" buffer size is just whatever buffer size the device is already set to. This may be device/driver specific behaviour.
What I'm looking for is the buffer size the device reports as optimal, where the driver doesn't have to split/combine blocks (i.e. usually the same as the device's internal buffer size).
Querying stream buffer sizes I'd like to consolidate to issue #1042.
What I'm looking for is the buffer size the device reports as optimal, where the driver doesn't have to split/combine blocks (i.e. usually the same as the device's internal buffer size).
Best take would the device default buffer size. In v0.17 I overhauled the buffer size system to move from cpal defaults to real device defaults. So when you use BufferSize::Default, you get that "device's internal buffer size" you speak of.
PR up at #1080 for reading default buffer size from Stream.