本文整理汇总了C++中CCdInfo::SetAudioTrackCount方法的典型用法代码示例。如果您正苦于以下问题:C++ CCdInfo::SetAudioTrackCount方法的具体用法?C++ CCdInfo::SetAudioTrackCount怎么用?C++ CCdInfo::SetAudioTrackCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCdInfo
的用法示例。
在下文中一共展示了CCdInfo::SetAudioTrackCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetCdInfo
//.........这里部分代码省略.........
if (i == 1)
{
xbmc_cdtext_t xcdt;
GetCdTextInfo(xcdt, 0);
info->SetDiscCDTextInformation( xcdt );
}
// Get this tracks info
GetCdTextInfo(ti.cdtext, i);
}
else
{
m_nNumData++;
if ( -1 == m_nFirstData)
m_nFirstData = i;
}
ti.nfsInfo = FS_NO_DATA;
ti.ms_offset = 0;
ti.isofs_size = 0;
ti.nJolietLevel = 0;
ti.nFrames = ::cdio_get_track_lba(cdio, i);
ti.nMins = 0;
ti.nSecs = 0;
info->SetTrackInformation( i, ti );
/* skip to leadout? */
if (i == m_nNumTracks)
i = CDIO_CDROM_LEADOUT_TRACK;
}
info->SetCddbDiscId( CddbDiscId() );
info->SetDiscLength( ::cdio_get_track_lba(cdio, CDIO_CDROM_LEADOUT_TRACK) / CDIO_CD_FRAMES_PER_SEC );
info->SetAudioTrackCount( m_nNumAudio );
info->SetDataTrackCount( m_nNumData );
info->SetFirstAudioTrack( m_nFirstAudio );
info->SetFirstDataTrack( m_nFirstData );
CLog::Log(LOGINFO, "CD Analysis Report");
CLog::Log(LOGINFO, STRONG);
/* Try to find out what sort of CD we have */
if (0 == m_nNumData)
{
/* no data track, may be a "real" audio CD or hidden track CD */
msf_t msf;
::cdio_get_track_msf(cdio, 1, &msf);
m_nStartTrack = ::cdio_msf_to_lsn(&msf);
/* CD-I/Ready says start_track <= 30*75 then CDDA */
if (m_nStartTrack > 100 /* 100 is just a guess */)
{
m_nFs = GuessFilesystem(0, 1);
if ((m_nFs & FS_MASK) != FS_UNKNOWN)
m_nFs |= HIDDEN_TRACK;
else
{
m_nFs &= ~FS_MASK; /* del filesystem info */
CLog::Log(LOGDEBUG, "Oops: %i unused sectors at start, but hidden track check failed.", m_nStartTrack);
}
}
PrintAnalysis(m_nFs, m_nNumAudio);
}
else
{
示例2: GetCdInfo
//.........这里部分代码省略.........
ti.nSecs = temp2 / 75; // calculate the number of seconds
if ( -1 == m_nFirstAudio)
m_nFirstAudio = i;
// Make sure that we have the Disc related info available
if (i == 1)
{
GetCdTextInfo(&ti_0, 0);
info->SetDiscCDTextInformation( ti_0.cdtext );
}
// Get this tracks info
GetCdTextInfo(&ti, i);
}
else
{
m_nNumData++;
if ( -1 == m_nFirstData)
m_nFirstData = i;
}
ti.ms_offset = 0;
ti.isofs_size = 0;
ti.nJolietLevel = 0;
ti.nFrames = ::cdio_get_track_lba(cdio, i);
info->SetTrackInformation( i, ti );
/* skip to leadout? */
if (i == m_nNumTracks)
i = CDIO_CDROM_LEADOUT_TRACK;
}
info->SetCddbDiscId( CddbDiscId() );
info->SetDiscLength( ::cdio_get_track_lba(cdio, CDIO_CDROM_LEADOUT_TRACK) / CDIO_CD_FRAMES_PER_SEC );
info->SetAudioTrackCount( m_nNumAudio );
info->SetDataTrackCount( m_nNumData );
info->SetFirstAudioTrack( m_nFirstAudio );
info->SetFirstDataTrack( m_nFirstData );
char buf[1024];
CLog::Log(LOGINFO, "CD Analysis Report");
CLog::Log(LOGINFO, STRONG);
/* try to find out what sort of CD we have */
if (0 == m_nNumData)
{
/* no data track, may be a "real" audio CD or hidden track CD */
msf_t msf;
::cdio_get_track_msf(cdio, 1, &msf);
m_nStartTrack = ::cdio_msf_to_lsn(&msf);
/* CD-I/Ready says start_track <= 30*75 then CDDA */
if (m_nStartTrack > 100 /* 100 is just a guess */)
{
m_nFs = GuessFilesystem(0, 1);
if ((m_nFs & FS_MASK) != FS_UNKNOWN)
m_nFs |= HIDDEN_TRACK;
else
{
m_nFs &= ~FS_MASK; /* del filesystem info */
sprintf(buf, "Oops: %i unused sectors at start, "
"but hidden track check failed.\n",
m_nStartTrack);
OutputDebugString( buf );
}
}