rncbc / qjackctl

QjackCtl - JACK Audio Connection Kit Qt GUI Interface
https://qjackctl.sourceforge.io
GNU General Public License v2.0
186 stars 42 forks source link

[MacOS] Unable to specify input/output devices with spaces #156

Closed VladV closed 2 years ago

VladV commented 3 years ago

I'm trying to configure separate input and output devices – that is, -C and -P options of jackd.

Dropdowns in Settings/Advanced are inactive for some reason, so I can't use them.

Specifying -C <device name> as server suffix doesn't work either, because the name contains spaces (jackd -l lists it as Device ID = '46' name = 'USB Digital Audio', internal name = 'AppleUSBAudioEngine:MACROSILICON:USB Video:14413000:3' (to be used as -C, -P, or -d parameter)). The name gets split by spaces, so only AppleUSBAudioEngine:MACROSILICON:USB is fed to jackd, so it fails to resolve the device (if I give the name in quotes to jackd in a shell, it works fine, so the problem is specific to QjackCtl).

image

QjackCtl 0.9.4, MacOS Catalina 10.15.7 (Intel).

rncbc commented 3 years ago

have no experience on macosx though I vaguely remember the "coreaudio" back-end do not allow for separate capture (-C) and playback devices (-P); maybe things have evolved since a decade or so, IDK. I don't touch that platform anyhow; someone else who can may chime in perhaps...

suggestion: use quotes (' or ") explicitly on the device name entry fields.

VladV commented 3 years ago

As I said, jackd by itself works fine, so coreaudio seems not to be a problem now.

I tried using quotes to no avail - as far as I can see from the code, arguments in "server suffix" are just split by spaces, with no respect for quoting. If you implement more elaborate parsing of this field, that might help - probably, would be useful for other platforms too (not sure whether spaces in device names are legal elsewhere).

rncbc commented 3 years ago

PR's are welcome!

amurzeau commented 3 years ago

I think I reproduce this on Windows when putting something like "C:\Program Files\JACK2\jackd.exe" in the Server Prefix instead of just jackd. In the logs, it tells that it couldn't start jack with the path "C:\Program.exe Files\JACK2\jackd.exe" which has a .exe in the middle of the path. On windows, this can be worked around by just setting the current directory to Jack's one and just keep "jackd" in the Server Prefix.

A PR that fix this but requires C++14 is Ok ? I'm planning to use std::quoted.

[EDIT]: also do you remember how to trigger the issue that was fixed with https://github.com/rncbc/qjackctl/commit/d11ef3a0f9f42794a39eac8d8537c8248b6b27d4 ? Ah I've found: Using -C"ASIO::Synchronous Audio Router" leads to Can't open "ASIO::Synchronous Audio Router", PortAudio will use default input device. error from jack, quote needs to be removed indeed.

kaii-zen commented 2 years ago

I don't actually swim in C++ or Qt but I seem to have fixed it by changing a handful of lines. Here's the PR: https://github.com/rncbc/qjackctl/pull/179