View Single Post
Old 5th October 2005, 21:03   #20
DrO
 
Join Date: Sep 2003
Posts: 27,873
code:
int modify_samples1(struct winampDSPModule *this_mod,
short int *samples,
int numsamples, int bps, int nch, int srate){
int x = 0, s = numsamples*nch, beep = 0;

for(x = 0; x < s; x ++){if(!samples[x]){beep+=1;}}

if(beep >= s){
if(!timer){timer = SetTimer(this_mod->hwndParent,1997,
wait,restart);}
}
else{if(timer){
KillTimer(this_mod->hwndParent,timer);timer = 0;}
}

return numsamples;
}

edited to not break the frames and that's the core part of the plugin with it setting/removing the timer as required when null samples/valid samples are detected

-daz
DrO is offline   Reply With Quote