Пример #1
0
void dss_squarewave_reset(struct node_description *node)
{
	struct dss_squarewave_context *context = node->context;
	PRECISION start;

	/* Establish starting phase, convert from degrees to radians */
	start=(node->input[5]/360.0)*(2.0*PI);
	/* Make sure its always mod 2Pi */
	context->phase=fmod(start,2.0*PI);

	/* Step the output */
	dss_squarewave_step(node);
}
Пример #2
0
void dss_squarewave_reset(struct node_description *node)
{
	struct dss_squarewave_context *context = node->context;
	double start;

	/* Establish starting phase, convert from degrees to radians */
	start=(DSS_SQUAREWAVE__PHASE/360.0)*(2.0*M_PI);
	/* Make sure its always mod 2Pi */
	context->phase=fmod(start,2.0*M_PI);

	/* Step the output */
	dss_squarewave_step(node);
}