Move AlsaMixer initialization to post_start()

This commit is contained in:
Stein Magnus Jodal 2011-03-09 21:41:32 +01:00
parent 8c163104d1
commit 9b77d34e24

View File

@ -23,7 +23,9 @@ class AlsaMixer(ThreadingActor, BaseMixer):
"""
def __init__(self):
# PYKKA-TODO: Do mixer detection after actor starts?
self._mixer = None
def post_start(self):
self._mixer = alsaaudio.Mixer(self._get_mixer_control())
assert self._mixer is not None