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

import hanging indefinitely if pulseaudio daemon is down #74

Open lucastcox opened 4 years ago

lucastcox commented 4 years ago

The issue lies in this code

If I

 import soundcard as sc 

and pulseaudio is not running, it will hang indefinitely while importing because of the the while loop. It might not be a bad idea to specify a maximum timeout and throw an exception if pulseaudio is unavailable.

bastibe commented 4 years ago

Good idea! Would you like to contribute a pull request?