Create pyaudio using portaudio with ASIO support

I am running Python 2.7.3 [MSC v.1500 32 bit (Intel)] on win32.

I need to create a portaudio with ASIO support and associate it with pyaudio in order to use it under Windows 7. Basically, I want to access the ASIO driver from python, and I realized that it is. I follow the guide from the pyaudio webpage http://people.csail.mit.edu/hubert/pyaudio/ . The manual is pretty dated, gcc no longer supports the -mno-cygwin flag. What I've done:

  • Download PyAudio-0.2.7 from your web page.
  • Download the stable portaudio-v19 http://www.portaudio.com/download.html
  • Threw out the "-mno-cygwin" options from the manual and compiled portaudio (gcc version 4.5.3)
  • Edited C: \ Python27 \ Lib \ distutils \ cygwinccompiler.py and removed the "-mno-cygwin" flag from the file.
  • I ran the suggested pyaudio compilation, but getting a gcc error

    $ ../Python27/python.exe setup.py build --static-link -cmingw32 running build running build_py creating build creating build\lib.win32-2.7 copying src\pyaudio.py -> build\lib.win32-2.7 running build_ext building '_portaudio' extension creating build\temp.win32-2.7 creating build\temp.win32-2.7\Release creating build\temp.win32-2.7\Release\src C:\MinGW\bin\gcc.exe -mdll -O -Wall -I./portaudio-v19\include/ -Ic:\Python27\inc lude -Ic:\Python27\PC -c src/_portaudiomodule.c -o build\temp.win32-2.7\Release\ src\_portaudiomodule.o -fno-strict-aliasing writing build\temp.win32-2.7\Release\src\_portaudio.def C:\MinGW\bin\gcc.exe -shared -s build\temp.win32-2.7\Release\src\_portaudiomodul eo build\temp.win32-2.7\Release\src\_portaudio.def -Lc:\Python27\libs -Lc:\Pyth on27\PCbuild -lwinmm -lpython27 -lmsvcr90 -o build\lib.win32-2.7\_portaudio.pyd ./portaudio-v19\lib/.libs/libportaudio.a -lwinmm gcc: error: ./portaudio-v19\lib/.libs/libportaudio.a: No such file or directory error: command 'gcc' failed with exit status 1 

I assume that the compilation of portaudio failed. I think the mentioned libportaudio.a is a linux file. Can you say what went wrong?

+4
source share
2 answers

But the file from http://www.lfd.uci.edu/~gohlke/pythonlibs/ does not support ASIO unfortunately. To get ASIO support, you also need to get the ASIO SDK. I managed to assemble it with the 2010 x64 visual studio, but still trying to figure out how to get it to use ASIO in practice (the output is still only 2 channels, when there should be 4-8 of my card

+1
source

This is because the file is actually called libportaudio.dll.a after compiling on Windows, but even renaming it does not sort the problem. It is much easier to just download and install the binary from http://www.lfd.uci.edu/~gohlke/pythonlibs/

Installing pyaudio to work with cygwin python is another thing that I have a problem.

-1
source

Source: https://habr.com/ru/post/1479728/


All Articles