[SCD] fixes CD-DA fader when audio is muted

This commit is contained in:
EkeEke 2012-10-15 10:15:52 +02:00
parent 93e16de9ca
commit c830a70872

View File

@ -751,11 +751,21 @@ void cdd_read_audio(unsigned int samples)
blip_add_delta_fast(blip[1], i, delta);
/* update CD-DA fader volume (one step/sample) */
if (curVol < endVol) curVol++;
else if (curVol > endVol) curVol--;
/* audio is muted */
if (!endVol) break;
if (curVol < endVol)
{
/* fade-in */
curVol++;
}
else if (curVol > endVol)
{
/* fade-out */
curVol--;
}
else if (!curVol)
{
/* audio will remain muted until next setup */
break;
}
}
/* save current CD-DA fader volume */