Example #1
0
void CVideoPlayBack::OnBnClickedButtonPlayfast()
{
	// TODO: 在此添加控件通知处理程序代码
	m_nSpeed ++;
	if(m_nSpeed < 0)
	{
		m_nSpeed ++;
		OnBnClickedButtonPlayslow();
		return;
	}
	if(m_nSpeed > 4)
	{
		m_nSpeed = 4;
	}
	SetPlaySpeed();
	
	m_PlayFastTime = 1000/(pow((DOUBLE)2, m_nSpeed));
	if(m_PlayFastTime < 62)
	{
		return;
	}
	m_SleepTime = m_PlayFastTime;
	CString	strText;
	strText.Format(_T("%d X"), (int)pow((DOUBLE)2, m_nSpeed));
	GetDlgItem(IDC_STATIC_SPEED)->SetWindowText(strText);
}
Example #2
0
void CVideoPlayBack::OnBnClickedButtonPlayslow()
{

	// TODO: 在此添加控件通知处理程序代码

	m_nSpeed --;
	if(m_nSpeed >= 0)
	{
		m_nSpeed --;
		OnBnClickedButtonPlayfast();
		return;
	}
	if(m_nSpeed < -4)
	{
		m_nSpeed = -4;
	}
	SetPlaySpeed();

	m_PlaySlowTime = 1000 * (pow((DOUBLE)2, abs(m_nSpeed)));
	if(m_PlaySlowTime > 16000)
	{
		return;
	}
	m_SleepTime = m_PlaySlowTime;
	CString	strText;
	strText.Format(_T("1/%d X"), (int)pow((DOUBLE)2, abs(m_nSpeed)));
	GetDlgItem(IDC_STATIC_SPEED)->SetWindowText(strText);
	

}
Example #3
0
//---------------------------------------------------------------------
///
/// This function sets the RealPause state
///
/// Only set this value to true if the application being debugged can
/// handle delta t = 0.
///
/// \param bRealPause the current RealPause state
//---------------------------------------------------------------------
void TimeControl::SetRealPause(bool bRealPause)
{
    m_RealPause = bRealPause;
    SetPlaySpeed(m_SpeedControl);
}