Closed pgScorpio closed 1 year ago
Hi @pgScorpio and sorry for the inactivity here. This is now being addressed.
KoordASIO/FlexASIO actually correctly reports the number of channels, but I think Jamulus itself is being over-zealous in insisting on both stereo input and stereo output. I tested with a USB speaker headset with
Jamulus does indeed fail on trying to load this mono mic as you described, and I traced this behaviour back to this commit from 2007: https://github.com/jamulussoftware/jamulus/commit/74cb27d2bc97860d3163e43a71edd3e994fc790f
but IMO there isn't an obvious reason why this is in place - especially as Jamulus has mono modes of operation(?).
Indeed if you simply comment out the lines: https://github.com/jamulussoftware/jamulus/blob/master/src/sound/asio/sound.cpp#L168-L174 and rebuild Jamulus you will find that it works fine with KoordASIO/FlexASIO :)
Note: I'm not sure how/why ASIO4ALL reports 2 x input channels for a single-channel input device - that may be a quirk or a workaround. I did a basic debug run with Jamulus/Koord-RealTime and ASIO4ALL using that mono USB mic - it did indeed report 2 x channels:
lNumInChan: 2
lNumOutChan: 2
It seems like the better thing to do would be to NOT fail on valid single-channel input devices, rather than rely on this strange behaviour.
One to raise with the Jamulus folks?
Yes, I already reported this issue on the Jamulus github. And I am also working on a better sound implementation in Jamulus myself, but also the Jamulus development is on a low level these days. (I'm already waiting months now for approval reviews.)
Ok yes I see the issue here: https://github.com/jamulussoftware/jamulus/issues/2344
Your changes in the original post look interesting - if you'd be interested, I'd welcome a PR on our (compatible) fork at https://github.com/koord-live/koord-realtime ;) Otherwise I will follow your example changes as given and test myself. Our fork is in fairly heavy development (mostly recently on adding integrated video with the koord.live service) but we have a lot of interesting changes going on in the GUI and on mobile devices. Keep an eye out in the coming weeks for the v2 update.
As this is more focused on Jamulus and its restrictions than the ASIO driver, deferring this issue to https://github.com/koord-live/KoordASIO/issues/4.
@pgScorpio Out of interest, regarding your re-factoring of Jamulus audio codebase that you mentioned earlier: did you consider using the JUCE framework at all, and if not why not?
Jamulus 3.8.1 does not accept mono input devices (almost all USB headsets) with KoordASIO. Same headsets via ASIO4ALL are accepted though.... Shouldn't KoordASIO also always report 2 inputs, even when mono? (Either one silent channel or same input on both channels)