aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authornotaz2012-11-03 22:06:31 +0200
committernotaz2012-11-03 22:06:31 +0200
commit341eb2c9753ba61a81d4422f283785b666e14e87 (patch)
treef07cb00d568b13d5dbd9f94861ca3d836729de9a /libpcsxcore
parenta084eccd6fda714520f41a09774576e2f5053575 (diff)
downloadpcsx_rearmed-341eb2c9753ba61a81d4422f283785b666e14e87.tar.gz
pcsx_rearmed-341eb2c9753ba61a81d4422f283785b666e14e87.tar.bz2
pcsx_rearmed-341eb2c9753ba61a81d4422f283785b666e14e87.zip
cdrom: read subq directly, not from thread
thread is doing 10 sectors at once, not that accurate..
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/cdriso.c7
-rw-r--r--libpcsxcore/cdrom.c6
2 files changed, 6 insertions, 7 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c
index 0089cfe..8a631f4 100644
--- a/libpcsxcore/cdriso.c
+++ b/libpcsxcore/cdriso.c
@@ -185,13 +185,6 @@ static void *playthread(void *param)
cdda_cur_sector++;
}
- if (subHandle != NULL) {
- fseek(subHandle, cdda_cur_sector * SUB_FRAMESIZE, SEEK_SET);
- fread(subbuffer, 1, SUB_FRAMESIZE, subHandle);
-
- if (subChanRaw) DecodeRawSubData();
- }
-
if (s == 0) {
playing = FALSE;
initial_offset = 0;
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c
index 297c8ae..afacad2 100644
--- a/libpcsxcore/cdrom.c
+++ b/libpcsxcore/cdrom.c
@@ -541,6 +541,9 @@ static void cdrPlayInterrupt_Autopause()
struct SubQ *subq = (struct SubQ *)CDR_getBufferSub();
int track_changed = 0;
if (subq != NULL ) {
+ // update subq
+ ReadTrack( cdr.SetSectorPlay );
+
#ifdef CDR_LOG
CDR_LOG( "CDDA SUB - %X:%X:%X\n",
subq->AbsoluteAddress[0], subq->AbsoluteAddress[1], subq->AbsoluteAddress[2] );
@@ -958,6 +961,9 @@ void cdrInterrupt() {
subq = (struct SubQ *)CDR_getBufferSub();
if (subq != NULL) {
+ // update subq
+ ReadTrack( cdr.SetSectorPlay );
+
cdr.Result[0] = subq->TrackNumber;
cdr.Result[1] = subq->IndexNumber;
memcpy(cdr.Result + 2, subq->TrackRelativeAddress, 3);