briankendall / proxy-audio-device

A virtual audio driver for macOS to sends all audio to another output
The Unlicense
514 stars 33 forks source link

[Enhancement] Possibility to proxy multiple devices #22

Open AdelaideSky opened 1 year ago

AdelaideSky commented 1 year ago

Hey ! First of all, thanks for this amazing project that is really helpful to me :0

I'm the developper of GoXlr-on-macos, a project written in swift & objc that aims to provide macos compatibility for the GoXlr (a usb mixer). In order to make this device fully compatible, I need to code an audio driver, that splits the channels of the goxlr !

And that's why I found your project, as it's almost exactly what I need in order to make this driver !

I opened this "issue" (as it's more a request...), to know if it's hard for you to bring the possibility to add multiple proxied devices in your driver ! For example, having a virtual device owned by the driver who proxy a audio device, and an other virtual audio device that proxies an other device !

I don't really know if it's clear, and if it's actually possible, but this would be incredible if you can do that !

Sorry (and thanks !) for the time you may take, or the time you took in this request (feel free to close it without context if it bother you xDD), Wish you a great day, Adélaïde Sky

briankendall commented 1 year ago

I'm not quite sure how to create multiple audio devices from a single plug-in, but I'm sure it can be done. The source code for the proxy device is based off of some example code from Apple named NullAudio. Sadly documentation for Core Audio plug-ins like this is very lacking, and I didn't find much else to help me outside of that code and reading the comments in it, many of which are still in the source code in this repo.

I think the first place to look though would be in the GetBoxPropertyData method. My understanding is that the 'box' contains all of the audio devices managed by the plugin, and one of its properties is kAudioBoxPropertyDeviceList. The proxy device just returns one device, but I believe that property can return an array of devices.

AdelaideSky commented 1 year ago

Actually I already tried to modify your code but just successfully proxied automatically a device via their uid, and select the channels to proxy...

I'm going to test to modify this function tonight but there is an other problem: how to change the behaviour of the second device ? As I don't have access to the code right now I may ask dumb questions but I don't see how to separate the behaviour of the second device...

Thanks again for your reply and your time !

stdk00 commented 9 months ago

Multiple-device support would be awesome! Any plans for releasing this in the future or has anyone found a way of making this work?