2

I was wondering if there's a library, complementing to PyAudio, for controlling the gain levels of microphones. I see that the audacity program can do it. They have a library called portmixer which seems to be part of their project (not an independent library) and requires patches to portaudio. I'm just wondering if anyone has ported something like this to Python, or made some bindings for the library, or if it's up to me to do it?

Michael Fox
  • 3,632
  • 1
  • 17
  • 27
  • have you tried [AlsaAudio](http://pyalsaaudio.sourceforge.net/pyalsaaudio.html#what-is-alsa)? This complements the Linux/Unix side. – hexerei software Apr 06 '15 at 11:46
  • 1
    similar question and answer [here](http://stackoverflow.com/questions/1936828/how-get-sound-input-from-microphone-in-python-and-process-it-on-the-fly) – hexerei software Apr 06 '15 at 11:47
  • 1
    Thanks @hexereisoftware but I'm trying to make my program as as cross-platform as PyAudio itself. Using ALSA won't even support all of the Linux desktops, since some people are using Jack, OSS, or PulseAudio. – Michael Fox Apr 06 '15 at 12:06
  • From my experience it is up to you to write the mixer interfaces. There are (or at least were) issues with PortMixer and deprecated Windows APIs. http://stackoverflow.com/questions/22562741/set-audio-input-level-using-portaudio/22623359#22623359 – trukvl Apr 28 '15 at 16:45
  • As far as I know, Jack and PulseAudio are layers on top of ALSA (and OSS on older systems). Unless you are supporting legacy systems (ALSA superceeded OSS in 2002 https://wiki.archlinux.org/index.php/Open_Sound_System), you shoulding have to worry about OSS. You should be able to control mixers with ALSA even if PulseAudio or Jack are also in use. – trukvl Apr 28 '15 at 16:50

0 Answers0