Page 1 of 1
Modstream and silence detection
Posted: 31 Jul 2016 16:05
by AladnaFm
Hi,
we are using the modstream but sometimes it will happen that the connection is lost.
There for we had setup the silence detection.
But when a silence happens and the connection drops the playlist start playing but there is no sound coming out.
What could this be? Is the connection not completely disconnected?
Greetz Jesper
Re: Modstream and silence detection
Posted: 31 Jul 2016 22:37
by radio42
Can you please send me the command on how you start the MODStreamWatcher?
As well please also send me your commands your trigger with OnSilenceDetected.
However, when the MODStream Player looses its connection, it automatically disconnects itself and thus resumes any paused playlist.
If this is not happening, I can only assume, that the stream is still connected.
Do you send a MODSTREAM_WATCHER_STOP command at any time? If not, please try to do so, as else the MODStreamPlayer might still be running? Is its windows being closed?
And what are you exactly doing when you detect silence? Are you somehow changing the volume via control commands yourself?
Re: Modstream and silence detection
Posted: 31 Jul 2016 23:29
by AladnaFm
The job it needs to do when silence detected is create a playlist from a script and start playing till the connection is re established.
Volume is not changing or changed.
The modstream we start manually.
We use the following command for onsilencedetection:
PLS_CURRENT_CLOSE
SLEEP 1000
PROGRAM_STARTSCRIPT |Automaat|${now}|true
PLS_CURRENT_AUTOPLAY_ON
But what I have seen now playlist isn't started but only pre loaded. So no wonder there is no audio.
The autoplay goes ON and directly OFF again.
So the playlist never starts.
Never used the command Stop modwatcher because the modtream cannot be closed entirely because it needs to continue when it is reconnected.
Re: Modstream and silence detection
Posted: 01 Aug 2016 15:56
by AladnaFm
The scheduler was off indeed.
Changed the settings to the one you gave me and it is working!
Thanks!
Greetz Jesper
Re: Modstream and silence detection
Posted: 01 Aug 2016 20:36
by radio42
The playlist is not started automatically, as I assume your Scheduler is NOT running.
In this case, a manually started program via PROGRAM_STARTSCRIPT is only started automatically (AutoPlay will be turned on) in case you specified set the 'Scheduler Stop Option' to 'DontStopAutoPlay' (see general settings, section Scripts/Scheduler).
If you set the 'Scheduler Stop Option' to 'DontStopAutoPlay', you won't even need the subsequent PLS_CURRENT_AUTOPLAY_ON command!
Your PLS_CURRENT_AUTOPLAY_ON command is failing due to the multi-threading nature of ProppFrexx.
A new Program/Playlist is started asynchronious in a bachground thread. This means, it take a bit to create a new playlist, execute the script, scheduler the initial tracks and load them to the DJ Players.
While all this is done in the background, the application is not blocked, as such, the next control-command (PLS_CURRENT_AUTOPLAY_ON) is already executed, while the playlist is not fully created, as such, it kind of fails unattended.
Here the 2 options you have:
1) Set the 'Scheduler Stop Option' to 'DontStopAutoPlay' and use this command sequence:
PLS_CURRENT_CLOSE
SLEEP 1000
PROGRAM_STARTSCRIPT |Automaat|${now}|true
2) Add another one or two Sleep commands (make sleep time is 2 sec):
PLS_CURRENT_CLOSE
SLEEP 1000
PROGRAM_STARTSCRIPT |Automaat|${now}|true
SLEEP 2000
SLEEP 2000
PLS_CURRENT_AUTOPLAY_ON