Skip to content

[alsa-devices] Let ALSA users pick a sound card#390

Merged
csete merged 2 commits intogqrx-sdr:masterfrom
Cat-Ion:alsa-devices
Jul 5, 2016
Merged

[alsa-devices] Let ALSA users pick a sound card#390
csete merged 2 commits intogqrx-sdr:masterfrom
Cat-Ion:alsa-devices

Conversation

@Cat-Ion
Copy link
Contributor

@Cat-Ion Cat-Ion commented Jul 5, 2016

Currently ALSA users can't pick an output sound card. With this patch, it's possible to enter (and save) usual ALSA strings like "hw:0,0" to do so.

idx = ui->outDevCombo->currentIndex();

if (idx > 0)
if (idx > 0
Copy link
Collaborator

@csete csete Jul 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer not putting an #ifdef inside an expression. Perhaps something like this instead:

#if defined(WITH_PULSEAUDIO) || defined(GQRX_OS_MACX)
    if (idx > 0)
    {
        qDebug() << "Output device" << idx << ":" << QString(outDevList[idx-1].get_name().c_str());
        m_settings->setValue("output/device", QString(outDevList[idx-1].get_name().c_str()));
    }
#else
    if (idx > 0 || ui->outDevCombo->currentText() != "Default")
    {
        qDebug() << "Output device:" << ui->outDevCombo->currentText();
        m_settings->setValue("output/device", ui->outDevCombo->currentText());
    }
#endif
    else
    {
        m_settings->remove("output/device");
    }

@csete csete merged commit 47c3c11 into gqrx-sdr:master Jul 5, 2016
@csete
Copy link
Collaborator

csete commented Jul 5, 2016

Thanks.

@Cat-Ion
Copy link
Contributor Author

Cat-Ion commented Jul 5, 2016

Thanks for merging :)

@Cat-Ion Cat-Ion deleted the alsa-devices branch July 5, 2016 22:32
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

Successfully merging this pull request may close these issues.

2 participants