Exemple #1
0
static void activateAutoPhaser(LADSPA_Handle instance) {
	AutoPhaser *plugin_data = (AutoPhaser *)instance;
	allpass *ap = plugin_data->ap;
	envelope *env = plugin_data->env;
	float sample_rate = plugin_data->sample_rate;
	float ym1 = plugin_data->ym1;
#line 100 "phasers_1217.xml"
	ap_clear(ap);
	ap_clear(ap+1);
	ap_clear(ap+2);
	ap_clear(ap+3);
	ap_clear(ap+4);
	ap_clear(ap+5);
	plugin_data->ap = ap;
	plugin_data->env = env;
	plugin_data->sample_rate = sample_rate;
	plugin_data->ym1 = ym1;

}
Exemple #2
0
static void activateLfoPhaser(LADSPA_Handle instance) {
	LfoPhaser *plugin_data = (LfoPhaser *)instance;
	allpass *ap = plugin_data->ap;
	int count = plugin_data->count;
	float f_per_lv = plugin_data->f_per_lv;
	int lfo_pos = plugin_data->lfo_pos;
	float *lfo_tbl = plugin_data->lfo_tbl;
	float ym1 = plugin_data->ym1;
#line 100 "phasers_1217.xml"
	ap_clear(ap);
	ap_clear(ap+1);
	ap_clear(ap+2);
	ap_clear(ap+3);
	ap_clear(ap+4);
	ap_clear(ap+5);
	plugin_data->ap = ap;
	plugin_data->count = count;
	plugin_data->f_per_lv = f_per_lv;
	plugin_data->lfo_pos = lfo_pos;
	plugin_data->lfo_tbl = lfo_tbl;
	plugin_data->ym1 = ym1;

}
Exemple #3
0
static void activateFourByFourPole(LADSPA_Handle instance) {
	FourByFourPole *plugin_data = (FourByFourPole *)instance;
	allpass *ap = plugin_data->ap;
	float sr_r_2 = plugin_data->sr_r_2;
	float y0 = plugin_data->y0;
	float y1 = plugin_data->y1;
	float y2 = plugin_data->y2;
	float y3 = plugin_data->y3;
#line 100 "phasers_1217.xml"
	ap_clear(ap);
	ap_clear(ap+1);
	ap_clear(ap+2);
	ap_clear(ap+3);
	ap_clear(ap+4);
	ap_clear(ap+5);
	ap_clear(ap+6);
	ap_clear(ap+7);
	ap_clear(ap+8);
	ap_clear(ap+9);
	ap_clear(ap+10);
	ap_clear(ap+11);
	ap_clear(ap+12);
	ap_clear(ap+13);
	ap_clear(ap+14);
	ap_clear(ap+15);
	plugin_data->ap = ap;
	plugin_data->sr_r_2 = sr_r_2;
	plugin_data->y0 = y0;
	plugin_data->y1 = y1;
	plugin_data->y2 = y2;
	plugin_data->y3 = y3;

}
Exemple #4
0
ap_1adr ()
{
    struct ap_node basenode;
    AP_ptr ap_sp;        /* Saved ap node ptr                    */
    AP_ptr r822ptr,
	   r733prefptr;
    int    got822;
    char    buf[LINESIZE];
    register int    state;

#if DEBUG > 1
    if (debug)
	(void) putchar ('\n');
#endif

    ap_routing = DONE;
    ap_ninit (&basenode);
    ap_sqinsert (&basenode, APP_ETC, ap_pstrt);
    for (state = STINIT, got822 = FALSE, r733prefptr = (AP_ptr) 0; ;){
#if DEBUG > 1
	if (debug)
	    printf ("=>%d (%s)", state,
		(state >= 0 && state <= 13) ? statnam[state] : "BOGUS!");
#endif
	switch (state)
	{
	    case STITER:          /* Iteration to get real address        */
		ap_palloc ();
		state = STINIT;   /* just DROP ON THROUGH                 */
	    case STINIT:          /* START of parse; empty node           */
		ap_sp = ap_pcur;
		switch (ap_lex (buf)){
		    case LV_WORD:
			ap_pfill (APV_WORD, buf);
			state = STPHRSE;
			break;
		    case LV_AT:
			if (!got822){
			    got822 = TRUE;
			    r822ptr = ap_pcur;
			}
			ap_routing = OK;
#if DEBUG > 1
			if (debug)
			    printf ("(routing)");
#endif
			state = STDOMAIN;
			break;
		    case LV_COLON:
				  /* DATA TYPE start                      */
			state = STDTYPE;
			break;
		    case LV_SEMI: /* GROUP LIST end                       */
			state = STEGRP;
			break;
		    case LV_GRTR: /* PERSONAL LIST end                    */
			state = STEPER;
			break;
		    case LV_LESS: /* allow one angle-bracket, here */
		    case LV_FROM: /* FILE source                          */
			ap_pfill (APV_DTYP, "Include");
			state = STITER;
			break;
		    case LV_COMMENT:
			ap_pfill (APV_CMNT, buf);
			state = STITER;
			break;
		    case LV_COMMA:
			break;    /* ignore null addresses                */
		    case LV_EOD:
			if (ap_perlev != 0 || ap_grplev != 0)
				state = STEBAD;
			else
				state = STEDONE;
			break;
		    default:
			state = STEBAD;
			break;
		}
		continue;


/* ***************************  ENDING  ********************************* */

	    case STECMNT:         /* accept comments until end            */
		switch (ap_lex (buf)) {
		    case LV_COMMENT:
			ap_pfill (APV_CMNT, buf);
			break;    /* just cycle, accepting comments     */
		    case LV_COMMA:
			state = STEOK;
			break;
		    case LV_EOD:
			state = STEOK;
			break;
		    default:
			state = STEBAD;
			break;
		}
		continue;

	    case STEDONE:         /* END clean; NO empty nodes?           */
#if DEBUG > 1
		if (debug)
		    (void) putchar ('\n');
#endif
		ap_7to8 (r733prefptr, r822ptr);
		return (DONE);

	    case STEOK:         /* END clean                            */
#if DEBUG > 1
		if (debug)
		    (void) putchar ('\n');
#endif
		ap_7to8 (r733prefptr, r822ptr);
		return (OK);

	    case STEBAD:         /* END error                            */
#if DEBUG > 1
		if (debug)
		    (void) putchar ('\n');
#endif
		ap_clear();		/* Experimental, DPK, 7 Aug 84 */
		return (NOTOK);
/* *********************  GATHER A PHRASE  **************************** */

	    case STPHRSE:         /* PHRASE continuation; empty node      */
		switch (ap_lex (buf)) {
		    case LV_WORD: /* append word to phrase, maybe         */
			ap_padd (APV_WORD, buf);
			break;
		    case LV_AT:   /* MAILBOX (name) end                 */
			if (!got822)
			    r822ptr = ap_pcur;
			ap_sqtfix (ap_sp, ap_pcur, APV_MBOX);
			ap_palloc ();
			state = STDOMAIN;
			break;
		    case LV_LESS: /* PERSON NAME end                      */
			state = STSTPER;
			break;
		    case LV_COLON:
				  /* GROUP NAME end                       */
			if (ap_grplev++ >= 1 && ap_intype == AP_822)
			{        /* may not be nested */
#if DEBUG > 1
			    if (debug)
				printf ("(intype=%d,ap_grplev=%d)",
					   ap_intype, ap_grplev);
#endif
			    state = STEBAD;
			    break;
			}
			ap_sqtfix (ap_sp, ap_pcur, APV_GRUP);
			ap_sp -> ap_obtype = APV_NGRP;
			state = STITER;
			break;
		    case LV_SEMI:
			ap_sqtfix (ap_sp, ap_pcur, APV_MBOX);
			ap_sp -> ap_obtype = APV_MBOX;
			state = STEGRP;
			break;
		    case LV_GRTR:
			state = STEPER;
			break;
		    case LV_COMMA:
			ap_sqtfix (ap_sp, ap_pcur, APV_MBOX);
			state = STEOK;
			break;
		    case LV_EOD:
			ap_sqtfix (ap_sp, ap_pcur, APV_MBOX);
			state = STEOK;
			break;
		    case LV_COMMENT:
			ap_pappend (APV_CMNT, buf);
			break;
		    default:
			state = STEBAD;
			break;
		}
		continue;

/* ***********************  ADDRESS LISTS  **************************** */

	    case STSTPER:         /* PERSONAL address list; NO empty node */
		if (ap_perlev++ > 0 && ap_intype == AP_822)
		{        /* may not be nested */
#if DEBUG > 1
		    if (debug)
			printf ("(intype=%d,ap_perlev=%d)",
				   ap_intype, ap_perlev);
#endif
		    state = STEBAD;
		    break;
		}
		ap_routing = OK;
		ap_sqtfix (ap_sp, ap_pcur, APV_PRSN);
		ap_sp -> ap_obtype = APV_NPER;
		state = STITER;
		continue;

	    case STEPER:
		if (--ap_perlev < 0) {
#if DEBUG > 1
		    if (debug)
			printf ("(ap_perlev=%d)", ap_perlev);
#endif
		    state = STEBAD;
		    break;
		}
		ap_pappend (APV_EPER, (char *) 0);
		ap_palloc ();   /* SEK add storage */
		state = STECMNT; /* allow comments, etc */
		continue;

	    case STEGRP:
		if (--ap_grplev < 0) {
#if DEBUG > 1
		    if (debug)
			printf ("(ap_grplev=%d)", ap_grplev);
#endif
		    state = STEBAD;
		    break;
		}
		ap_pappend (APV_EGRP, (char *) 0);
		state = STECMNT;
		continue;


/* **************************  DATA TYPE  ******************************* */

	    case STDTYPE:          /* DATA TYPE name; empty node           */
		if (ap_intype == AP_822)
		{        /* data types not legal in 822 */
#if DEBUG > 1
		    if (debug)
			printf ("(intype=%d)", ap_intype);
#endif
		    state = STEBAD;
		    break;
		}
		if (ap_lex (buf) != LV_WORD) {
		    state = STEBAD;
		    continue;
		}
		ap_pfill (APV_DTYP, buf);
		state = STEDTYPE;
				  /* Just drop on through                 */
	    case STEDTYPE:         /* DATA TYPE name end; empty node       */
		state = (ap_lex (buf) == LV_COLON)
		    ? STITER : STEBAD;
		continue;
/* *************************  DOMAIN  *********************************** */

	    case STDOMAIN:        /* DOMAIN/Host; NO empty parse node   */
		switch (ap_lex (buf)) {
		    default:
			state = STEBAD;
			continue;
		    case LV_COMMENT:
			ap_pappend (APV_CMNT, buf);
			continue;
		    case LV_DLIT:
			ap_pappend (APV_DLIT, buf);
			state = STEDOMAIN;
			continue;
		    case LV_WORD:
			ap_pfill (APV_DOMN, buf);
			state = STEDOMAIN;
		}                 /* just drop on through                 */

	    case STEDOMAIN:       /* DOMAIN end; NO empty parse node      */
		switch (ap_lex (buf)) {
		    case LV_AT:   /* sequence of HOST's => @ separation   */
				  /* SEK correct here              */
			if (r733prefptr == (AP_ptr) 0)
			    r733prefptr = ap_pcur;
			ap_palloc ();
				 /* node which points to first routing ref */
			state = STDOMAIN;
			break;
		    case LV_SEMI:
			state = STEGRP;
			break;
		    case LV_GRTR:
			state = STEPER;
			break;
		    case LV_COMMA:
			if (ap_routing != DONE)
			    state = STITER;
			else
			    state = STEOK;
			break;
		    case LV_EOD:
			if (ap_routing != DONE || 
			    ap_perlev != 0 || ap_grplev != 0)
			    state = STEBAD;
			else
			    state = STEOK;
			break;
		    case LV_COMMENT:
			ap_pappend (APV_CMNT, buf);
			break;
		    case LV_COLON:
			if (ap_routing != DONE) {
			    ap_routing = DONE;
			    state = STITER;
			    continue;
			}       /* else DROP ON THROUGH */
		    default:
			state = STEBAD;
			break;
		}
		continue;
	}
    }
}