本文整理汇总了C++中CDAccess::Read_TOC方法的典型用法代码示例。如果您正苦于以下问题:C++ CDAccess::Read_TOC方法的具体用法?C++ CDAccess::Read_TOC怎么用?C++ CDAccess::Read_TOC使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDAccess
的用法示例。
在下文中一共展示了CDAccess::Read_TOC方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Eject
bool CDIF_ST::Eject(bool eject_status)
{
if(UnrecoverableError)
return(false);
try
{
if(eject_status != DiscEjected)
{
disc_cdaccess->Eject(eject_status);
// Set after ->Eject(), since it might throw an exception.
DiscEjected = -1; // For if TOC reading fails or there's something horribly wrong with the disc.
if(!eject_status) // Re-read the TOC
{
disc_cdaccess->Read_TOC(&disc_toc);
if(disc_toc.first_track < 1 || disc_toc.last_track > 99 || disc_toc.first_track > disc_toc.last_track)
{
throw(MDFN_Error(0, _("TOC first(%d)/last(%d) track numbers bad."), disc_toc.first_track, disc_toc.last_track));
}
}
DiscEjected = eject_status;
}
}
catch(std::exception &e)
{
MDFN_PrintError("%s", e.what());
return(false);
}
return(true);
}
示例2: Eject
bool CDIF_ST::Eject(bool eject_status)
{
if(UnrecoverableError)
return(false);
try
{
int32_t old_de = DiscEjected;
DiscEjected = eject_status;
if(old_de != DiscEjected)
{
disc_cdaccess->Eject(eject_status);
if(!eject_status) // Re-read the TOC
{
disc_cdaccess->Read_TOC(&disc_toc);
if(disc_toc.first_track < 1 || disc_toc.last_track > 99 || disc_toc.first_track > disc_toc.last_track)
throw(MDFN_Error(0, _("TOC first(%d)/last(%d) track numbers bad."), disc_toc.first_track, disc_toc.last_track));
}
}
}
catch(std::exception &e)
{
log_cb(RETRO_LOG_ERROR, "%s\n", e.what());
return(false);
}
return(true);
}
示例3: RT_EjectDisc
void CDIF_MT::RT_EjectDisc(bool eject_status, bool skip_actual_eject)
{
if(eject_status != DiscEjected)
{
if(!skip_actual_eject)
disc_cdaccess->Eject(eject_status);
// Set after ->Eject(), since it might throw an exception.
DiscEjected = -1; // For if TOC reading fails or there's something horribly wrong with the disc.
if(!eject_status) // Re-read the TOC
{
disc_cdaccess->Read_TOC(&disc_toc);
if(disc_toc.first_track < 1 || disc_toc.last_track > 99 || disc_toc.first_track > disc_toc.last_track)
{
throw(MDFN_Error(0, _("TOC first(%d)/last(%d) track numbers bad."), disc_toc.first_track, disc_toc.last_track));
}
}
DiscEjected = eject_status;
SBWritePos = 0;
ra_lba = 0;
ra_count = 0;
last_read_lba = ~0U;
memset(SectorBuffers, 0, SBSize * sizeof(CDIF_Sector_Buffer));
}
}
示例4: RT_EjectDisc
void CDIF_MT::RT_EjectDisc(bool eject_status, bool skip_actual_eject)
{
int32_t old_de = DiscEjected;
DiscEjected = eject_status;
if(old_de != DiscEjected)
{
if(!skip_actual_eject)
disc_cdaccess->Eject(eject_status);
if(!eject_status) // Re-read the TOC
{
disc_cdaccess->Read_TOC(&disc_toc);
if(disc_toc.first_track < 1 || disc_toc.last_track > 99 || disc_toc.first_track > disc_toc.last_track)
throw(MDFN_Error(0, _("TOC first(%d)/last(%d) track numbers bad."), disc_toc.first_track, disc_toc.last_track));
}
SBWritePos = 0;
ra_lba = 0;
ra_count = 0;
last_read_lba = ~0U;
memset(SectorBuffers, 0, SBSize * sizeof(CDIF_Sector_Buffer));
}
}