Commit 1684e855 authored by Matěj Laitl's avatar Matěj Laitl
Browse files

EngineController: fall-back to Phonon's equalizer band names on parse error

We used to parse equalizer band names as returned by phonon, but it
seems that at least some phonon backeds now just return "band0",
"band1" etc. Fallback to phonon names to expose the bug and let
Phonomials do something with it.

Note that there's one unrelated bug: Amarok doesn't recognise phonon
equalizer doesn't support pre-amplifier and misaligns labels by one.

CCBUG: 280318
parent 06d97bd3
......@@ -833,20 +833,16 @@ EngineController::eqBandsFreq() const
foreach( const Phonon::EffectParameter &mParam, mEqPar )
{
if( mParam.name().contains( QString( "pre-amp" ) ) )
{
mBandsFreq << i18n( "Preamp" );
}
else if ( mParam.name().contains( rx ) )
{
if( rx.cap( 0 ).toInt() < 1000 )
{
mBandsFreq << i18n( "%0\nHz" ).arg( rx.cap( 0 ) );
}
else
{
mBandsFreq << i18n( "%0\nkHz" ).arg( QString::number( rx.cap( 0 ).toInt()/1000 ) );
}
}
else
mBandsFreq << mParam.name();
}
return mBandsFreq;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment