cli: support "dummy" audio interface

specify '-' to to skip loading PortAudio shared library.
This commit is contained in:
Roman Zeyde
2015-02-14 10:38:21 +02:00
parent c0634a34d0
commit b3804a42be
3 changed files with 17 additions and 3 deletions

View File

@@ -15,7 +15,8 @@ def test():
lib.Pa_OpenStream.return_value = 0
cdll.return_value = lib
interface = audio.Interface(config=config.fastest(), debug=True)
with interface.load(name='portaudio'):
interface.load(name='portaudio')
with interface:
s = interface.player()
assert s.params.device == 1
s.stream = 1 # simulate non-zero output stream handle