#include #include "demo_io.h" #include "audio\FORVIDAUDIO.h" #include "recog\comm_rscApp_trigforvid.h" #include "recog\trig_rscApp_trigforvid.h" PARAMETERPASS results; void main(void) { uchar error; uchar class; _SysBeep (500); while (1) { _GreenOn(); _RedOff(); error = _T2SI((long)&nn_trigforvid, (long)&gsearch_trig_trigforvid, T2SI_DEFAULT_KNOB , T2SI_DEFAULT_TIMEOUT, T2SI_DEFAULT_TRAILING, &results); _GreenOff(); if(error == ERR_OK) { _SysBeep (20); _YellowOn(); error = _T2SI((long)&nn_trigforvid, (long)&gsearch_comm_trigforvid, T2SI_DEFAULT_KNOB , T2SI_DEFAULT_TIMEOUT, T2SI_DEFAULT_TRAILING, &results); class = results.pp_b; _YellowOff(); if ((class == G_comm_trigforvid_nota) || (error == ERR_RECOG_LOW_CONF)) { _RedOn(); _DelayMilliSecs(500); _RedOff(); } else if ((error == ERR_OK) || (error == ERR_RECOG_MID_CONF)) { if(class==G_comm_trigforvid_OPEN) _PlaySnd(SND_open, (long)&SNDTBL_FORVIDAUDIO, 256); if(class==G_comm_trigforvid_CLOSE) _PlaySnd(SND_close, (long)&SNDTBL_FORVIDAUDIO, 256); } } } }