summaryrefslogtreecommitdiff
path: root/libpcsxcore/cdriso.c
diff options
context:
space:
mode:
authorSND\notaz_cp <SND\notaz_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-01-12 21:07:37 +0000
committerSND\notaz_cp <SND\notaz_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-01-12 21:07:37 +0000
commitc288a602fc242050515e4ff3753bce02e713077e (patch)
tree16c6825f12dd396e888d6f9940cde5a4cac08907 /libpcsxcore/cdriso.c
parentc59b7d800daeee2768e636dfde1db6aea539f5fb (diff)
cdriso: handle cdda playback on data tracks
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@82224 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/cdriso.c')
-rwxr-xr-xlibpcsxcore/cdriso.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c
index 03413976..b7c4bccb 100755
--- a/libpcsxcore/cdriso.c
+++ b/libpcsxcore/cdriso.c
@@ -1295,10 +1295,18 @@ long CALLBACK ISOreadCDDA(unsigned char m, unsigned char s, unsigned char f, uns
cddaCurPos = msf2sec(msf);
// find current track index
- for (track = numtracks; track > 1; track--) {
+ for (track = numtracks; ; track--) {
track_start = msf2sec(ti[track].start);
if (track_start <= cddaCurPos)
break;
+ if (track == 1)
+ break;
+ }
+
+ // data tracks play silent
+ if (ti[track].type != CDDA) {
+ memset(buffer, 0, CD_FRAMESIZE_RAW);
+ return 0;
}
file = 1;