Skip to content

Commit

Permalink
mcd, fix audio not playing when buffer RAM enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
irixxxx committed Feb 23, 2024
1 parent ad43165 commit 4aaedc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pico/cd/cdd.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static void cdd_change_track(int index, int lba)
{
int i, base, lba_offset, lb_len;

for (i = index; i > 0; i--)
for (i = index; i >= 0; i--)
if (cdd.toc.tracks[i].fd != NULL)
break;

Expand Down Expand Up @@ -510,7 +510,7 @@ int cdd_unload(void)
void cdd_read_data(uint8 *dst)
{
/* only read DATA track sectors */
if ((cdd.lba >= 0) && (cdd.lba < cdd.toc.tracks[cdd.index].end))
if (!is_audio(cdd.index) && (cdd.lba >= 0) && (cdd.lba < cdd.toc.tracks[cdd.index].end))
{
/* BIN format ? */
if (cdd.sectorSize == 2352)
Expand Down

0 comments on commit 4aaedc8

Please sign in to comment.