freesig / cpal

Audio player in pure Rust
0 stars 0 forks source link

Potential problem with multiple streams #36

Open freesig opened 6 years ago

freesig commented 6 years ago

Situation

  1. Create a stream with 6 channels
  2. Create a stream with 4 channels The ASIO stream is recreated with whatever number of channels the last stream has. So in this case the first stream will loose two channels. This is also true for change of sample rate. Remember there is only ever one input and one output ASIO stream.

    Ideas

    • We could maybe keep a total channels so that the number of channels in the ASIO channel are never reduced but only increase.
    • We actually check the max channel of all active streams. This will prevent a situation where you launch a stream with heaps of channels but then remove it but you are stuck with all those channels.
    • Neither of these really solve the problem of trying to create different streams with different sample rates. We could check that the sample rates match or return an error