|
a/src/mpdcli.cxx |
|
b/src/mpdcli.cxx |
|
... |
|
... |
325 |
|
325 |
|
326 |
LOGDEB("MPDCli::setVolume: vol " << volume << " isMute " << isMute << endl);
|
326 |
LOGDEB("MPDCli::setVolume: vol " << volume << " isMute " << isMute << endl);
|
327 |
|
327 |
|
328 |
if (isMute) {
|
328 |
if (isMute) {
|
329 |
if (volume) {
|
329 |
if (volume) {
|
|
|
330 |
// If we're already not muted, do nothing
|
|
|
331 |
if (m_premutevolume == 0)
|
|
|
332 |
return true;
|
330 |
// Restore premute volume
|
333 |
// Restore premute volume
|
331 |
LOGDEB("MPDCli::setVolume: restoring premute " << m_premutevolume
|
334 |
LOGDEB("MPDCli::setVolume: restoring premute " << m_premutevolume
|
332 |
<< endl);
|
335 |
<< endl);
|
333 |
volume = m_stat.volume = m_premutevolume;
|
336 |
volume = m_stat.volume = m_premutevolume;
|
334 |
m_premutevolume = 0;
|
337 |
m_premutevolume = 0;
|
335 |
} else {
|
338 |
} else {
|
|
|
339 |
// If we're already muted, do nothing
|
|
|
340 |
if (m_premutevolume > 0)
|
|
|
341 |
return true;
|
336 |
if (m_cachedvolume > 0) {
|
342 |
if (m_cachedvolume > 0) {
|
337 |
m_premutevolume = m_cachedvolume;
|
343 |
m_premutevolume = m_cachedvolume;
|
338 |
}
|
344 |
}
|
339 |
}
|
345 |
}
|
340 |
}
|
346 |
}
|