Author: bklaas
Date: Wed Jan 13 12:54:23 2010
New Revision: 8331
URL: http://svn.slimdevices.com/jive?rev=8331&view=rev
Log:
Bug: 14870
Description: Use decode:status().audioState as the gold standard for deciding
if audio is coming out the speakers. In my tests this reliably works for both
streaming audio and the client-side fallback alarm.
I believe this checkin may fix the reliability issues such that a user should
be able to depend on something to wake them up at alarm time.
I will fall short of calling this bug fixed, but let's call it "Release
Candidate 1" :)
Modified:
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
Modified:
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
URL:
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua?rev=8331&r1=8330&r2=8331&view=diff
==============================================================================
---
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
(original)
+++
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
Wed Jan 13 12:54:23 2010
@@ -182,32 +182,18 @@
function _alarm_sledgehammerRearm(self, caller)
local hammer = false
- if self.alarmInProgress == 'server' then
- local status = decode:status()
- -- just informational
- log:warn('alarm_sledgehammerRearm(', caller,'): SERVER alarm in
progress - audioState is ', status.audioState)
-
- if not status.audioState == 1 then
- log:warn('alarm_sledgehammerRearm(', caller,'): SERVER
alarm in progress, but stream is nil - firing fallback alarm')
- hammer = true
- end
- -- restart audio on any state transition from SqueezeOS, but not on
local polls
- --elseif self.alarmInProgress == 'rtc' and caller ~= '_pollDecodeState'
then
- elseif self.alarmInProgress == 'rtc' then
- log:warn('alarm_sledgehammerRearm(', caller,'): RTC alarm
already in progress - restarting alarm audio asynchronously')
+ local status = decode:status()
+ --debug.dump(status)
+
+ log:warn('alarm_sledgehammerRearm(', caller,'): ',
self.alarmInProgress, ' alarm in progress - audioState is ', status.audioState)
+ if status.audioState ~= 1 then
hammer = true
end
-
+
if hammer then
- -- immediately set volume back where it was
- log:warn('alarm_sledgehammerRearm: local volume is ',
self.localPlayer:getVolume())
- --localPlayer:volumeLocal(43);
-
- -- let some time pass so whatever is messing with the player
settings underneath finishes (last request to play wins!)
- -- self:openAlarmWindow('rtc')
-
self:_stopTimer()
-- kickstart audio output again, asynchronously, so whatever
else is messing with the audio settings is hopefully finished
+ log:warn('alarm_sledgehammerRearm: audio not in good shape
while alarm is firing. restart timer asynchronously at 1.5secs')
self:_startTimer(1500)
end
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins