From 0e171a58f2e17b617c64fba51bcdc6da6294cce4 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Wed, 2 May 2018 09:25:49 +0300 Subject: [PATCH] amodem: disable PortAudio when I/O is redirected --- amodem/__main__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/amodem/__main__.py b/amodem/__main__.py index 18bbc6b..3d3f67a 100644 --- a/amodem/__main__.py +++ b/amodem/__main__.py @@ -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)