CDImage: Support sub-images, use subimages for m3u

This commit is contained in:
Connor McLaughlin
2021-03-27 02:19:23 +10:00
parent 573aa6d9cc
commit 50d712c3fe
23 changed files with 443 additions and 312 deletions

View File

@ -17,7 +17,7 @@ public:
bool CopyImage(CDImage* image, ProgressCallback* progress);
bool ReadSubChannelQ(SubChannelQ* subq) override;
bool ReadSubChannelQ(SubChannelQ* subq, const Index& index, LBA lba_in_index) override;
bool HasNonStandardSubchannel() const override;
protected:
@ -116,12 +116,12 @@ bool CDImageMemory::CopyImage(CDImage* image, ProgressCallback* progress)
return Seek(1, Position{0, 0, 0});
}
bool CDImageMemory::ReadSubChannelQ(SubChannelQ* subq)
bool CDImageMemory::ReadSubChannelQ(SubChannelQ* subq, const Index& index, LBA lba_in_index)
{
if (m_sbi.GetReplacementSubChannelQ(m_position_on_disc, subq))
if (m_sbi.GetReplacementSubChannelQ(index.start_lba_on_disc + lba_in_index, subq))
return true;
return CDImage::ReadSubChannelQ(subq);
return CDImage::ReadSubChannelQ(subq, index, lba_in_index);
}
bool CDImageMemory::HasNonStandardSubchannel() const