void dss_sinewave_reset(struct node_description *node) { struct dss_sinewave_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 the output to make it correct */ dss_sinewave_step(node); }
void dss_sinewave_reset(struct node_description *node) { struct dss_sinewave_context *context = node->context; double start; /* Establish starting phase, convert from degrees to radians */ start=(DSS_SINEWAVE__PHASE/360.0)*(2.0*M_PI); /* Make sure its always mod 2Pi */ context->phase=fmod(start,2.0*M_PI); /* Step the output to make it correct */ dss_sinewave_step(node); }