For .active property, check for .closed first
For .active property, check for .closed first

This way, a closed stream can be active==False instead of throwing an
exception.

spatialaudio/python-sounddevice,spatialaudio/python-sounddevice,tgarc/python-sounddevice,tgarc/python-sounddevice