Exemple #1
0
void dss_trianglewave_reset(struct node_description *node)
{
	struct dss_trianglewave_context *context = node->context;
	PRECISION start;

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

	/* Step to set the output */
	dss_trianglewave_step(node);
}
Exemple #2
0
void dss_trianglewave_reset(struct node_description *node)
{
	struct dss_trianglewave_context *context = node->context;
	double start;

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

	/* Step to set the output */
	dss_trianglewave_step(node);
}