From 4aaedc899e61d10e43b3d427f1c2d70ce859a80d Mon Sep 17 00:00:00 2001 From: kub Date: Fri, 23 Feb 2024 19:21:39 +0100 Subject: [PATCH] mcd, fix audio not playing when buffer RAM enabled --- pico/cd/cdd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pico/cd/cdd.c b/pico/cd/cdd.c index a3c3c93a..78fae75d 100644 --- a/pico/cd/cdd.c +++ b/pico/cd/cdd.c @@ -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; @@ -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) -- 2.39.5