Increment the LBA for both bin/cue and CHD audio reads. Fixes #324 (#326)

Co-authored-by: Zakk <zakk@rsdio.com>
This commit is contained in:
zakk4223
2021-01-09 03:06:33 -05:00
committed by GitHub
parent 20f9ab4078
commit df4f6a0a5f

View File

@@ -901,7 +901,6 @@ int cdd_t::ReadCDDA(uint8_t *buf)
for(int i = 0; i < this->audioLength / 2352; i++)
{
mister_chd_read_sector(this->toc.chd_f, this->lba + this->toc.tracks[this->index].offset, 2352*i, 0, 2352, buf, this->chd_hunkbuf, &this->chd_hunknum);
this->lba++;
}
//CHD audio requires byteswap. There's probably a better way to do this...
@@ -917,6 +916,7 @@ int cdd_t::ReadCDDA(uint8_t *buf)
FileReadAdv(&this->toc.tracks[this->index].f, buf, this->audioLength);
}
this->lba += (this->audioLength / 2352);
return this->audioLength;
}