amodem: disable PortAudio when I/O is redirected

This commit is contained in:
Roman Zeyde
2018-05-02 09:25:49 +03:00
parent 20f90edf8d
commit 0e171a58f2

View File

@@ -236,7 +236,11 @@ def _main():
from . import alsa
interface = alsa.Interface(config)
elif args.audio_library == '-':
interface = _Dummy()
interface = _Dummy() # manually disable PortAudio
elif args.command == 'send' and args.output is not None:
interface = _Dummy() # redirected output
elif args.command == 'recv' and args.input is not None:
interface = _Dummy() # redirected input
else:
interface = audio.Interface(config)
interface.load(args.audio_library)