Skip to content

Commit

Permalink
tweak audio device names, dont bother with api prefixes
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Jan 29, 2024
1 parent 098bc7b commit 1954136
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/systray/mod-desktop-app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ class AppWindow : public QMainWindow
const PaDeviceInfo* const devInfo = Pa_GetDeviceInfo(i);
const QString& hostApiName(apis[devInfo->hostApi]);

const QString devName(QString::fromUtf8(devInfo->name));
QString devName(QString::fromUtf8(devInfo->name));

#if defined(Q_OS_LINUX)
if (hostApiName == "ALSA")
Expand Down Expand Up @@ -542,16 +542,21 @@ class AppWindow : public QMainWindow

const QString uid(hostApiName + "::" + devName);

if (hostApiName == "JACK" || hostApiName == "JACK Audio Connection Kit")
devName = "JACK / PipeWire";
else if (hostApiName != "ALSA" && hostApiName != "Windows WASAPI")
devName = uid;

if (devInfo->maxInputChannels > 0 && canUseSeparateInput)
{
ui.cb_input->addItem(uid);
ui.cb_input->addItem(devName);
inputs.append(uid);
}

if (devInfo->maxOutputChannels > 0)
{
ui.cb_device->addItem(hostApiName == "JACK" || hostApiName == "JACK Audio Connection Kit"
? "JACK / PipeWire" : uid);
ui.cb_device->addItem(devName);

devices.append({
uid,
devInfo->maxInputChannels > 0,
Expand Down

0 comments on commit 1954136

Please sign in to comment.