当前位置: 首页>>代码示例>>C++>>正文


C++ CDAccess::Read_TOC方法代码示例

本文整理汇总了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);
}
开发者ID:BadyRaty,项目名称:Mednafen-Core,代码行数:34,代码来源:cdromif.cpp

示例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);
}
开发者ID:Warriors-Blade,项目名称:beetle-psx-libretro-Simias,代码行数:32,代码来源:cdromif.cpp

示例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));
 }
}
开发者ID:BadyRaty,项目名称:Mednafen-Core,代码行数:28,代码来源:cdromif.cpp

示例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));
   }
}
开发者ID:Warriors-Blade,项目名称:beetle-psx-libretro-Simias,代码行数:26,代码来源:cdromif.cpp


注:本文中的CDAccess::Read_TOC方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。