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

PaJack_SetClientName only available if portaudio has been compiled with JACK #972

Open
umlaeute opened this issue Oct 22, 2024 · 1 comment

Comments

@umlaeute
Copy link

PortAudio is great for writing applications that are written in an "audio-backend agnostic" way.

unfortunately, some of the features are only available if a certain backend has been compiled in.

E.g. i would like to set the client name of my application to something useful (if the backend supports client names).

This can be done with PaJack_SetClientName - but obviously this only works if portaudio has been compiled with JACK support.
I guess, right now the only backend that supports setting the client name is JACK - but from an application dev POV i would like to not care about such an implementation detail.
also, I'm (personally) using pre-built portaudio binaries (e.g. libportaudio2 on my Debian workstation), and there is no guarantee that such a pre-build binary actually is compiled with JACK support.

I would therefore like to propose to wrap backend-specific calls into generic backend-agnostic functions, that are always available.
e.g. Pa_SetClientName(const char*) (which internally might call PaJack_SetClientName() or whatever) to set the client-name for all backends (that support client names)

@umlaeute
Copy link
Author

umlaeute commented Oct 22, 2024

and before somebody suggests this: I'd rather not resort to doing a dynamic lookup of the PaJack_SetClientName symbol - it's just too brittle for cross-platform code.

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

1 participant