Load user-provided PortAudio name/path from environ's SD_PORTAUDIO
Implements the necessary functionality suggested in one of the discussions in #130.
Loads a user-specified PortAudio binary during runtime, by either providing its filename as usual or providing its absolute path. Providing a PortAudio binary's filename (if the directory it resides in exists in PATH), as well as its absolute path works on Windows, though needs confirmation on other platforms.
Hello @arkrow! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
- In the file
sounddevice.py:
Line 63:80: E501 line too long (81 > 79 characters) Line 73:80: E501 line too long (85 > 79 characters)
Comment last updated at 2024-01-21 18:15:02 UTC
I have documented how to load a custom PortAudio library: #518
@arkrow Do you think your PR is still needed, since users can already use custom DLLs etc.?
I have documented how to load a custom PortAudio library: #518
@arkrow Do you think your PR is still needed, since users can already use custom DLLs etc.?
One advantage this implementation has is that it solves potential PATH shadowing issues (e.g. another directory with portaudio is in PATH and has higher precedence/order, so it is loaded instead of the custom portaudio binary that a developer shipped with their package/software and intended to use).
I think it'd be good to continue the discussion in #130. I can pick up this PR again in the future if you are open to this implementation and other members of the community find it useful for their use case.