Esempio n. 1
0
//}}}
//{{{  GetSpeed
HavanaStatus_t HavanaPlayback_c::GetSpeed(int*       PlaySpeed)
{
	PlayerStatus_t      Status;
	PlayDirection_t     Direction;
	Rational_t          Speed;
	Status      = Player->GetPlaybackSpeed(PlayerPlayback, &Speed, &Direction);
	if (Status != PlayerNoError)
	{
		PLAYBACK_ERROR("Failed to get speed - Status = %x\n", Status);
		return HavanaError;
	}
	PLAYBACK_DEBUG("Getting speed of %d.%06d\n", Speed.IntegerPart(), Speed.RemainderDecimal());
	*PlaySpeed          = (int)IntegerPart(Speed * PLAY_SPEED_NORMAL_PLAY);
	if (((*PlaySpeed) == PLAY_SPEED_STOPPED) && (Direction != PlayForward))
		*PlaySpeed      = PLAY_SPEED_REVERSE_STOPPED;
	else if (Direction != PlayForward)
		*PlaySpeed      = -*PlaySpeed;
	return HavanaNoError;
}
Esempio n. 2
0
File: evalf.cpp Progetto: mulab/mU
var Round(Var x)
{
	return IntegerPart(x);
}
Esempio n. 3
0
File: evalf.cpp Progetto: mulab/mU
var Ceiling(Var x)
{
	return IntegerPart(x);
}
Esempio n. 4
0
File: evalf.cpp Progetto: mulab/mU
var Floor(Var x)
{
	return IntegerPart(x);
}