This project is a fork of two open source projects. If you'd like, give them some love:
See the example.
Exactly like the official PyAudio but with the extra option "as_loopback" which expects a boolean.
import pyaudio
p = pyaudio.PyAudio()
stream = p.open([...], as_loopback = True)
I will try to rebuild the project on each update from one of the used projects.
You will need a working cygwin installation with basic developer tools and python.
You might have to change all files to use LF line endings with
find . -type f -exec sed -i 's/\x0d//g' {} \+
Change to /pyaudio/portaudio-v19 and type
./configure --with-winapi=wasapi --enable-static=yes --enable-shared=no
make loopback
To rebuild type
make clean
make loopback
Change to /pyaudio and type
python setup.py install --static-link
You will need to include the python executable in PATH.
Open the portaudio project located in pyaudio\portaudio-v19\build\msvc\portaudio.sln.
Open the project configuration and make sure that the configuration type is set to static library.
Select the build type Release and x64. Then build the project.
Make sure the build was succesful and the file pyaudio\portaudio-v19\build\msvc\x64\Release\portaudio.lib does exist.
Open the PowerShell as administrator and change the directory. Then you can build and install pyaudio with portaudio:
cd <Location of the repository>\pyaudio_portaudio\pyaudio
python.exe .\setup.py install --static-link
If you get errors, let me know. Thank you ♥