Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable platform-specific features from PortAudio #4

Open
mgeier opened this issue Jul 23, 2015 · 8 comments
Open

Enable platform-specific features from PortAudio #4

mgeier opened this issue Jul 23, 2015 · 8 comments

Comments

@mgeier
Copy link
Member

mgeier commented Jul 23, 2015

See bastibe/PySoundCard#16.

@mgeier
Copy link
Member Author

mgeier commented Jul 29, 2015

One possible feature would be the "exclusive mode" of WASAPI, see http://stackoverflow.com/questions/31306010/how-to-enable-wasapi-exclusive-mode-in-pyaudio

@mgeier
Copy link
Member Author

mgeier commented Mar 20, 2016

PaAlsa_EnableRealtimeScheduling might be interesting for ALSA: http://portaudio.com/docs/v19-doxydocs-dev/pa__linux__alsa_8h.html#accc41e7fd89dc0a6163d54a4f25fb242

@raecke
Copy link

raecke commented Aug 8, 2016

It would be interesting to be able to select arbitrary channels for input and output. On Windows this is needed with ASIO. If you currently want to send data to output channels 9 and 10, you have to send data to all channels below 11. This means that sharing the soundcard with other applications becomes impossible.

The hostapis WDM-KS, MME, Directsound, normally only present 2 channels so it is not a problem there.

@mgeier
Copy link
Member Author

mgeier commented Aug 9, 2016

@raecke I created an experimental implementation in #34. Can you please check if it works for you and leave a comment there?

@mgeier
Copy link
Member Author

mgeier commented Jan 28, 2017

There is also PaAlsa_SetNumPeriods, which is by default set to 4, which seems random:

By default the number of periods is 4, this is the lowest number of periods that works well on the author's soundcard.

http://portaudio.com/docs/v19-doxydocs-dev/pa__linux__alsa_8h.html#a76f60d6f1ba6a298c038a9f3a6dccc53

It looks like this has to be called before opening a stream.

@mgeier
Copy link
Member Author

mgeier commented Apr 28, 2017

OK, I'm trying to make an exhaustive list of the current host-API-specific settings, let's see if that works:

hostApiSpecificStreamInfo to be specified separately for the input and output device when creating a stream:

Functions that are called with a stream pointer:

Global functions:

@philipmountifield
Copy link

Would love to be able to fetch PaAsio_GetInputChannelName and PaAsio_GetOutputChannelName though it looks like there hasn't been much movement on this feature?

@mgeier
Copy link
Member Author

mgeier commented May 20, 2020

@philipmountifield Can you please create a new issue with your request, including a suggestion how the new API should look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants