Skip to content

Commit

Permalink
Add volume fader to hard disable audio version of cd player
Browse files Browse the repository at this point in the history
Make hard audio disable versions of PCM and CD player set the end position
  • Loading branch information
Dwedit committed Apr 30, 2018
1 parent 1936457 commit eb0cae6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
27 changes: 27 additions & 0 deletions core/cd_hw/cdd.c
Expand Up @@ -1337,6 +1337,33 @@ void cdd_read_audio(unsigned int samples)

if (audio_hard_disable)
{
if (endVol > curVol)
{
if (endVol - curVol < samples)
{
curVol = endVol;
}
else
{
curVol += samples;
}
}
else if (curVol > endVol)
{
if (curVol - endVol < samples)
{
curVol = endVol;
}
else
{
curVol -= samples;
}
}

/* save current CD-DA fader volume */
cdd.volume = curVol;

blip_end_frame(snd.blips[2], samples);
return;
}

Expand Down
3 changes: 3 additions & 0 deletions core/cd_hw/pcm.c
Expand Up @@ -153,6 +153,9 @@ static void pcm_run_silent(unsigned int length)
}
}
#endif
/* end of blip buffer frame */
blip_end_frame(snd.blips[1], length);

pcm.cycles += length * PCM_SCYCLES_RATIO;
}

Expand Down

0 comments on commit eb0cae6

Please sign in to comment.