wave: use stdin/stdout if fname is None

This commit is contained in:
Roman Zeyde
2014-09-12 19:16:08 +03:00
parent 284d106b90
commit f0ff9c22ff

View File

@@ -14,7 +14,8 @@ bytes_per_second = bytes_per_sample * Fs
audio_format = 'S{}_LE'.format(bits_per_sample) # PCM signed little endian
def launch(tool, fname='-', **kwargs):
def launch(tool, fname=None, **kwargs):
fname = fname or '-'
args = [tool, fname, '-q', '-f', audio_format, '-c', '1', '-r', str(Fs)]
log.debug('Running: %r', args)
p = sp.Popen(args=args, **kwargs)