Author: awy
Date: Fri Aug 22 04:48:58 2008
New Revision: 2884

URL: http://svn.slimdevices.com?rev=2884&root=Jive&view=rev
Log:
Initialize sentDecoderFullEvent to false, so that STMl events are sent (for 
sync start).
Add 1s STMt tick while decoding.

Modified:
    7.3/trunk/squeezeplay/src/squeezeplay/share/jive/audio/Playback.lua

Modified: 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/audio/Playback.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/jive/audio/Playback.lua?rev=2884&root=Jive&r1=2883&r2=2884&view=diff
==============================================================================
--- 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/audio/Playback.lua 
(original)
+++ 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/audio/Playback.lua Fri Aug 
22 04:48:58 2008
@@ -12,6 +12,7 @@
 
 local Task                   = require("jive.ui.Task")
 local Timer                  = require("jive.ui.Timer")
+local Framework              = require("jive.ui.Framework")
 
 local debug                  = require("jive.utils.debug")
 local log                    = require("jive.utils.log").logger("audio")
@@ -62,6 +63,8 @@
        self.threshold = 0
        self.tracksStarted = 0
 
+       self.statusTimestamp = 0
+
        self.sentResume = false
        self.sentDecoderFullEvent = false
        self.sentDecoderUnderrunEvent = false
@@ -79,6 +82,7 @@
        status.serverTimestamp = serverTimestamp
 
        self.slimproto:send(status)
+       self.statusTimestamp = Framework:getTicks()
 end
 
 
@@ -185,6 +189,11 @@
                end
        end
 
+       if status.decodeState & DECODE_RUNNING and 
+               Framework:getTicks() > self.statusTimestamp + 1000
+       then
+               self:sendStatus(status, "STMt")
+       end
 
        -- stream metadata
        local metadata = Decode:streamMetadata()
@@ -283,7 +292,7 @@
 
 
 function _strm(self, data)
-       log:info("strm ", data.command)
+       if data.command ~= 't' then log:info("strm ", data.command)     end
 
        if data.command == 's' then
                -- start
@@ -313,7 +322,7 @@
                self.threshold = data.threshold * 1024
 
                self.sentResume = false
-               self.sentDecoderFullEvent = true
+               self.sentDecoderFullEvent = false
                self.sentDecoderUnderrunEvent = false
                self.sentOutputUnderrunEvent = false
                self.sentAudioUnderrunEvent = false

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to