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

Add Pa_IsHostApiInstalled(hostApiTypeId) to detect installed host APIs #253

Open
PortAudio-admin opened this issue Sep 3, 2016 · 0 comments
Labels
P3 Priority: Normal public-api The public API defined in include/PortAudio.h

Comments

@PortAudio-admin
Copy link
Collaborator

Issue created by @RossBencina

The new Pa_GetAvailableHostApis() API (see ticket #10) is not sufficient to inform the application about which APIs will actually work, since it only returns the APIs which were compiled in to PortAudio. Host APIs that PortAudio dynamically loads (e.g. DirectSound, and ALSA (when certain build flags are set) may be returned by Pa_GetAvailableHostApis() but not actually present (so initializing them will yield no devices).

The current idea is to add a new function:

/** Probe for whether a host API is actually installed on the system.

@return Returns paNoError if the API is present, and an error otherwise, 
such as paInvalidHostApi if the host API is not compiled in, or 
paHostApiNotFound if the host API is not present on the system.
*/
PaError Pa_IsHostApiInstalled( PaHostApiTypeId hostApiTypeId );  

At the present time there are two APIs that could support this function: ALSA and DirectSound.

The implementation would be easiest by building off the ticket #10 work and adding an additional IsHostApiInstalled function pointer to each host APIs initializer entry.

@PortAudio-admin PortAudio-admin added P3 Priority: Normal public-api The public API defined in include/PortAudio.h labels Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Priority: Normal public-api The public API defined in include/PortAudio.h
Projects
None yet
Development

No branches or pull requests

1 participant