From: kub Date: Fri, 23 Feb 2024 18:21:39 +0000 (+0100) Subject: mcd, fix audio not playing when buffer RAM enabled X-Git-Tag: v2.00~112 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4aaedc899e61d10e43b3d427f1c2d70ce859a80d;p=picodrive.git mcd, fix audio not playing when buffer RAM enabled --- 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)