mirror of
https://github.com/romanz/amodem.git
synced 2026-04-21 05:36:42 +08:00
wave: use stdin/stdout if fname is None
This commit is contained in:
@@ -14,7 +14,8 @@ bytes_per_second = bytes_per_sample * Fs
|
|||||||
audio_format = 'S{}_LE'.format(bits_per_sample) # PCM signed little endian
|
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)]
|
args = [tool, fname, '-q', '-f', audio_format, '-c', '1', '-r', str(Fs)]
|
||||||
log.debug('Running: %r', args)
|
log.debug('Running: %r', args)
|
||||||
p = sp.Popen(args=args, **kwargs)
|
p = sp.Popen(args=args, **kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user