Replace infinite looping with bounded looping in ReadStream and WriteStream if the stream stalls for some reason. Causes ReadStream and WriteStream to return paTimedOut after a long timeout (currently set to 3 times the total buffer duration).
Note that ideally we'd detect that the wmme stream has failed rather than depending on timeouts, but there doesn't seem to be an API for that.
Note that stalling is possibly driver-dependent but has been observed after system sleep/hibernation in #883.
Replace infinite looping with bounded looping in ReadStream and WriteStream if the stream stalls for some reason. Causes ReadStream and WriteStream to return
paTimedOut
after a long timeout (currently set to 3 times the total buffer duration).Note that ideally we'd detect that the wmme stream has failed rather than depending on timeouts, but there doesn't seem to be an API for that.
Note that stalling is possibly driver-dependent but has been observed after system sleep/hibernation in #883.
Proposed fix for #883