bastibe / SoundCard

A Pure-Python Real-Time Audio Library
https://soundcard.readthedocs.io
BSD 3-Clause "New" or "Revised" License
680 stars 69 forks source link

no wait while PA_CONTEXT_FAILED #100

Closed zhujisheng closed 4 years ago

zhujisheng commented 4 years ago

When connecting to PulseAudio, the state may be PA_CONTEXT_FAILED, which means the connection failed, and shouldn't wait forever. If this happen, an assert error is raised.

bastibe commented 4 years ago

Thank you very much for your pull request! This looks perfect!

Out of curiosity, did you find a definition for the sequence of pa_context_states beyond the enum names?

zhujisheng commented 4 years ago

https://freedesktop.org/software/pulseaudio/doxygen/def_8h.html#a892684c03cf9edaed1a95e609ec7573c