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

Channel mapping on Core Audio devices (MacOS) #71

Open
psunderr opened this issue Aug 20, 2021 · 2 comments
Open

Channel mapping on Core Audio devices (MacOS) #71

psunderr opened this issue Aug 20, 2021 · 2 comments

Comments

@psunderr
Copy link

Hello!

Is it possible to create channel maps for Core Audio devices so that audio signal can be directed to specific channels of a multi-channel interface? I'm currently using a Node.js port of Web Audio API (web-audio-engine) in order to send unique audio to specific channel pairs on a device with 10 outputs, but so far I can only send the audio to two channels without the audio glitching and reporting output underflows. I can successfully accomplish this in-browser by selecting the audio interface as the default output device for the system and routing the audio to the correct channels in my code, but the same routing does not work properly when selecting this device through naudiodon.

The feature in questions is PaMacCore_SetupChannelMap in pa__mac__core.h. @gschmottlach-xse mentioned something similar when referring to his ASIO port of naudiodon, but because the currently supported host APIs present Windows devices in pairs of two (Line 1/2, Line 3/4, etc.), there is a suitable workaround for me to handle the lack of ASIO-specific channel selection features.

If you end up implementing ASIO support in the refactored baseline then please consider fully supporting the ASIO host-specific features/APIs such as channel selectors and retrieving channel names. I did that in my implementation and these APIs are invaluable when you're dealing with ASIO input/outputs with 8 or more available channels and only need access to a subset of those channels. It's easy to forget these ASIO specific APIs. Good luck with your implementation . . . I'd love to see it properly integrated into the baseline!

Please let me know if there's a way to access this functionality via this wrapper, or if you might have any ideas on how to go about achieving similar results. Thanks for your help, and great work on this project!

@Stoyvo
Copy link

Stoyvo commented Nov 17, 2023

@psunderr did you have any luck with this?

I attempted Web Audio API to target specific device channels (Eg: Audio Interface channels 3/4) but had no luck.

@psunderr
Copy link
Author

@Stoyvo unfortunately not, but if you give me more details of your setup (OS, Web Audio library, audio device, etc.), I can let you know if we're having the same issue. You can email me directly at the address in my profile so we don't clutter up this issue.

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

2 participants