web-audio-api-rs icon indicating copy to clipboard operation
web-audio-api-rs copied to clipboard

Rewrite `CpalBackend::build_input` to make it similar to `build_output`

Open Jerboas86 opened this issue 4 years ago • 2 comments
trafficstars

Connection to the audio hardware is made through io::build_output and io::build_input functions.

  • build_output instantiates the output stream.
  • build_input instantiates the input stream.

A rewrite of io::build_output has been made by PR #36. This PR makes it possible for the end user to change output stream parameters like:

  • number of output channels
  • latency settings
  • sample rate But this PR stopped there, and the work has not been done for build_input function

A rewrite of io::build_input should be made to make stream configuration coherent between build_output and build_input functions. It would also be helpful if both functions used similar type system to define them.

Jerboas86 avatar Nov 15 '21 13:11 Jerboas86

Removing the v1 milestone because this is not part of the public API. The Microphone struct however is, and could benefit from the same config settings we'd like to pass to the io mod. Let's fix that after the v1 release (and introduce a Microphone::with_config constructor)

orottier avatar Apr 04 '22 06:04 orottier

Some work was done but we still need to implement the desired buffer_size AKA latency hint

orottier avatar Apr 12 '22 15:04 orottier

Fixed in #264

orottier avatar May 07 '23 11:05 orottier