mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-16 17:05:46 -04:00
CDImage: Fix incorrect index returned for track-relative 00:02:00
Fixes some voice lines being very briefly cut off in Tomb Raider.
This commit is contained in:
@ -280,7 +280,7 @@ void CDROM::InsertMedia(std::unique_ptr<CDImage> media)
|
||||
|
||||
// reading TOC? interestingly this doesn't work for GetlocL though...
|
||||
CDImage::SubChannelQ subq;
|
||||
if (media->Seek(0) && media->ReadSubChannelQ(&subq) && subq.IsCRCValid())
|
||||
if (media->Seek(0) && media->ReadRawSector(nullptr, &subq) && subq.IsCRCValid())
|
||||
m_last_subq = subq;
|
||||
|
||||
m_reader.SetMedia(std::move(media));
|
||||
|
@ -88,7 +88,7 @@ bool CDROMAsyncReader::ReadSectorUncached(CDImage::LBA lba, CDImage::SubChannelQ
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((subq && !m_media->ReadSubChannelQ(subq)) || (data && !m_media->ReadRawSector(data->data())))
|
||||
if (!m_media->ReadRawSector(data, subq))
|
||||
{
|
||||
Log_WarningPrintf("Read of LBA %u failed", lba);
|
||||
return false;
|
||||
@ -149,8 +149,8 @@ void CDROMAsyncReader::DoSectorRead()
|
||||
}
|
||||
}
|
||||
|
||||
CDImage::LBA pos = m_media->GetPositionOnDisc();
|
||||
if (!m_media->ReadSubChannelQ(&m_subq) || !m_media->ReadRawSector(m_sector_buffer.data()))
|
||||
const CDImage::LBA pos = m_media->GetPositionOnDisc();
|
||||
if (!m_media->ReadRawSector(m_sector_buffer.data(), &m_subq))
|
||||
{
|
||||
m_sector_read_result.store(false);
|
||||
Log_WarningPrintf("Read of LBA %u failed", pos);
|
||||
|
Reference in New Issue
Block a user