cpal
cpal copied to clipboard
Inconsistent stream auto-play behavior
StreamTrait::play says:
Note: Not all platforms automatically run the stream upon creation
This is a footgun, causing incautious applications to behave inconsistently on different platforms. Can cpal instead normalize platform behavior, perhaps by implicitly playing on platforms which start paused, or by deferring stream construction until the first play call at least on platforms with auto-play?
Some related discussion back in #175.
Tomaka's argument for initially-paused is compelling:
Another thing to take into account is that if you create a play-by-default voice then pause it, you might have a problem because the backend attempted to get data between the creation of the voice and the pausing.
I also see that ALSA historically was initially paused; I wonder when/why that changed.