mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
mcd, fix audio crash after end of last track
This commit is contained in:
parent
ae4d881a2f
commit
05d2acaeb2
3 changed files with 10 additions and 9 deletions
|
@ -700,6 +700,13 @@ void cdd_update(void)
|
|||
/* reading disc */
|
||||
if (cdd.status == CD_PLAY)
|
||||
{
|
||||
if (cdd.index >= cdd.toc.last)
|
||||
{
|
||||
/* end of disc */
|
||||
cdd.status = CD_END;
|
||||
return;
|
||||
}
|
||||
|
||||
/* track type */
|
||||
if (!is_audio(cdd.index))
|
||||
{
|
||||
|
@ -714,7 +721,7 @@ void cdd_update(void)
|
|||
/* data track sector read is controlled by CDC */
|
||||
cdd.lba += cdc_decoder_update(header);
|
||||
}
|
||||
else if (cdd.index < cdd.toc.last)
|
||||
else
|
||||
{
|
||||
uint8 header[4] = { 0, };
|
||||
|
||||
|
@ -731,12 +738,6 @@ void cdd_update(void)
|
|||
/* next audio block is automatically read */
|
||||
cdd.lba++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* end of disc */
|
||||
cdd.status = CD_END;
|
||||
return;
|
||||
}
|
||||
|
||||
/* check end of current track */
|
||||
if (cdd.lba >= cdd.toc.tracks[cdd.index].end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue