CDROM: Synthesize lead-out area and stop reading when reached

This commit is contained in:
Connor McLaughlin
2020-05-08 10:50:22 +10:00
parent c67e877d82
commit 5b389ae13d
7 changed files with 54 additions and 10 deletions

View File

@ -23,7 +23,13 @@ public:
FRAMES_PER_SECOND = 75, // "sectors", or "timecode frames" (not "channel frames")
SECONDS_PER_MINUTE = 60,
FRAMES_PER_MINUTE = FRAMES_PER_SECOND * SECONDS_PER_MINUTE,
SUBCHANNEL_BYTES_PER_FRAME = 12
SUBCHANNEL_BYTES_PER_FRAME = 12,
LEAD_OUT_SECTOR_COUNT = 6750
};
enum : u8
{
LEAD_OUT_TRACK_NUMBER = 0xAA
};
enum class ReadMode : u32
@ -235,6 +241,9 @@ protected:
/// Generates sub-channel Q from the given index and index-offset.
void GenerateSubChannelQ(SubChannelQ* subq, const Index* index, u32 index_offset);
/// Synthesis of lead-out data.
void AddLeadOutIndex();
std::string m_filename;
u32 m_lba_count = 0;