1
0
Fork 0

Fix sector 0 playback bug

This bug prevented reporting of correct playback position on
pure-audio CDs with zero PREGAP.
This commit is contained in:
krcroft 2020-02-12 08:13:37 -08:00
parent 7957435c53
commit fdf103a111
No known key found for this signature in database
GPG key ID: 4AD3678F4A2C291C

View file

@ -376,8 +376,8 @@ bool CDROM_Interface_Image::GetAudioSub(unsigned char& attr,
if (!tracks.empty()) { // We have a useable CD; get a valid play-position
track_iter track = tracks.begin();
// the CDs has been played and is at a valid position
if (player.trackFile && player.startSector) {
// the CD's current track is valid
if (player.trackFile) {
const uint32_t sample_rate = player.trackFile->getRate();
const uint32_t played_frames = (player.playedTrackFrames
* REDBOOK_FRAMES_PER_SECOND