bastibe / SoundCard

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

Fix attribute error when accessing stream state #65

Closed dindils closed 5 years ago

dindils commented 5 years ago

Hi, Was encountering an issue where stream creation would sometimes fail and instead of raising a runtime error it would encounter the following exception:

[...]
File "/usr/local/lib/python3.7/site-packages/SoundCard-0.3.2-py3.7.egg/soundcard/pulseaudio.py", line 585, in __enter__
    .format(_pulse.pa_stream_get_state(self.stream)))
AttributeError: '_PulseAudio' object has no attribute 'pa_stream_get_state'

I prefixed pa_stream_get_state with an underscore and I think that should fix it.

bastibe commented 5 years ago

Thank you very much for finding and fixing this error!

Sorry for the late response, I was on vacation.