external/libmodplug-0.8.9.0/src/load_pat.cpp
// calculate the best speed that approximates the pat root frequency as a C note
calculate the best speed that approximates the pat root frequency as a C note
calculate the best speed that approximates the pat root frequency as a C note
static ULONG pat_patrate_to_C4SPD(ULONG patRate , ULONG patMilliHz)
{
	ULONG u;
	double x, y;
	u = patMilliHz;
	x = 0.1 * patRate;
	x = x * C4mHz;
	y = u * 0.4;
	x = x / y;
	u = (ULONG)(x+0.5);
	return u;
}
static ULONG pat_patrate_to_C4SPD ( ULONG patRate , ULONG patMilliHz ) { ULONG u ; double x , y ; u = patMilliHz ; x = 0.1 * patRate ; x = x * C4mHz ; y = u * 0.4 ; x = x / y ; u = ( ULONG ) ( x + 0.5 ) ; return u ; }
calculate the best speed that approximates the pat root frequency as a C note
calculate the best speed that approximates the pat root frequency as a C note