コード例 #1
0
void AudioConfigSettings::AudioAdvanced()
{
    QString out  = m_OutputDevice->getValue();
    bool invalid = false;
    AudioOutputSettings settings;

    if (!audiodevs.contains(out))
    {
        invalid = true;
    }
    else
    {
        settings = audiodevs.value(out).settings;
    }

    AudioAdvancedSettingsGroup audiosettings(invalid ||
            (settings.canLPCM() &&
             settings.canPassthrough() >= 0));

    if (audiosettings.exec() == kDialogCodeAccepted)
    {
        AudioRescan();
        UpdateCapabilities(QString::null);
    }
}
コード例 #2
0
void AudioConfigSettings::AudioAdvanced()
{
    QString out  = m_OutputDevice->getValue();
    bool invalid = false;
    AudioOutputSettings settings;

    if (!audiodevs.contains(out))
    {
        invalid = true;
    }
    else
    {
        settings = audiodevs.value(out).settings;
    }

    bool LPCM1 = settings.canFeature(FEATURE_LPCM) &&
        gCoreContext->GetNumSetting("StereoPCM", false);

    AudioAdvancedSettingsGroup audiosettings(invalid ||
                                             (settings.canPassthrough() >= 0));

    if (audiosettings.exec() == kDialogCodeAccepted)
    {
        // Rescan audio list to check of override digital device
        AudioRescan();
        bool LPCM2 = settings.canFeature(FEATURE_LPCM) &&
            gCoreContext->GetNumSetting("StereoPCM", false);
            // restore speakers configure only of StereoPCM has changed and
            // we have LPCM capabilities
        UpdateCapabilities(QString::null, LPCM1 != LPCM2);
    }
}