Other question for Dllmain, how works this plugin you made? Is this a volume-level based plugin, or looks the plugin to winamp if it plays or not?
Announcement
Collapse
No announcement yet.
Detect Silence / Trigger Event
Collapse
X
-
-
-
Silence Detector v1.0
well i assume this works since it works fine on the files locally i could test which have silences but for all i know only dllmain's method may be suitable for this situation
-daz
Comment
-
-
@dro
the options are nice. how does your plugin do the silence detection exactly? can we have the source?
Comment
-
-
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 detectedcode:
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;
}
-daz
Comment
-
-
so you are detecting "digital silence". i thought you were analyzing the volume level.
Comment
-
-
Originally posted by DrO
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 detectedcode:
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;
}
-daz
err better question, is one plugin better then the other (lol I geuss i like starting conflict)
just out of curiousity, how often does this checking get done? Just curious about resources I guess (probably could stop that loop at the first non-zero bit too :P)
Comment
-
-
Maybe is it a idea to make that with some options?
How long must the detector wait before it send a play-request, or/and if you make it on the volume-level, maybe you can config how much dB means silence for the detector.
Some music-files have a silence for a copple of seconds...
Go go go, and make it! I still have one of dllmain, and it works very good. My internet-connection goes offline today and the plugin sends a play-request, again and again. Even so, after 5 minutes my internetlink is online and yes, winamp connects automatically, and the music goes on.
Veeeeeeeeeeeeeeeeeeery good!
Roland.
Comment
-
-
jumps to next playlist entry
Thanks guy's for working all this out. I have tried both the Silence_Detector_v1_0 & dsp_restless plugins. The Silence_Detector still hung @ 0%buffering so I tried the dsp_restless and it tends to jump to the next enty in the playlist and still has hangs @ 0%
. Is there anyway to improve the performace or are there any other solutions out there?
Comment
-
-
well as far as i can remember dsp_restless only emulates hitting "play" not "next track". so i guess this means your playlist entry is just not playable. i know this behavior from trying to play moved mp3 files. does this help?
Comment
-
-
thanks for the quick response...
even with just one playlist entry I still get the buffering with both plugins and I have tried diifernt entries. This is a new phenomonon in the last couple of weeks. I startrd a new thread here ( http://forums.winamp.com/showthread....hreadid=238803 ) on this with more detail of what I am experiencing. Thanks for the input dllmain, I'll keep looking for a solution...
Comment
-
-
Is it possible for the plugin to not be dsp based ?
I have on the same computer winamp that gets an internet stream from a radio station and then re-encodes it and broadcasts it to the shoutcast server running in the background.
This is why I can't use both DSP plugins (the shoutcast one and the silence detection).
Comment
-
-
Originally posted by skyraven This is why I can't use both DSP plugins (the shoutcast one and the silence detection). [/B]
Comment
-
-
Originally posted by skyraven
Thanks for the answer.
Sorry if this has been asked before.
Comment
-
Comment