mirror of
https://github.com/romanz/amodem.git
synced 2026-02-07 01:18:02 +08:00
__main__: fix dummy interface case
This commit is contained in:
@@ -218,6 +218,13 @@ def _main():
|
||||
if args.audio_library == 'ALSA':
|
||||
from . import alsa
|
||||
interface = alsa.Interface(config)
|
||||
elif args.audio_library == '-':
|
||||
class _DummyInterface(object):
|
||||
def __enter__(self):
|
||||
return self
|
||||
def __exit__(self, *args):
|
||||
pass
|
||||
interface = _DummyInterface()
|
||||
else:
|
||||
interface = audio.Interface(config)
|
||||
interface.load(args.audio_library)
|
||||
|
||||
Reference in New Issue
Block a user