@@ -47,15 +47,35 @@ ASIO Support
4747------------
4848
4949Installing the ``sounddevice `` module with ``pip `` (on Windows)
50- will provide PortAudio _ DLLs *without * ASIO support
50+ will provide two PortAudio _ DLLs, with and without ASIO support.
51+ By default, the DLL *without * ASIO support is loaded
5152(because of the problems mentioned in `issue #496 `__).
52- To enable ASIO support, download the file
53- `libportaudio64bit-asio.dll `__ or libportaudio32bit-asio.dll __
54- and rename/move it as described in the next section.
53+ To load the DLL *with * ASIO support, the environment variable ``SD_ENABLE_ASIO ``
54+ has to be set *before * importing the ``sounddevice `` module,
55+ for example like this:
56+
57+ .. code :: python
58+
59+ import os
60+
61+ # Set environment variable before importing sounddevice. Value is not important.
62+ os.environ[" SD_ENABLE_ASIO" ] = " 1"
63+
64+ import sounddevice as sd
65+
66+ print (sd.query_hostapis())
5567
5668__ https://github.com/spatialaudio/python-sounddevice/issues/496
57- __ https://github.com/spatialaudio/portaudio-binaries/raw/master/libportaudio64bit-asio.dll
58- __ https://github.com/spatialaudio/portaudio-binaries/raw/master/libportaudio32bit-asio.dll
69+
70+ .. note ::
71+
72+ This will only work if the ``sounddevice `` module has been installed via ``pip ``.
73+ This will not work with the ``conda `` package (see below).
74+
75+ .. note ::
76+
77+ This will not work if a custom ``portaudio.dll `` is present in the ``%PATH% ``
78+ (as described in the following section).
5979
6080
6181Custom PortAudio Library
0 commit comments