Author: agrundman
Date: Wed Sep 21 08:07:26 2011
New Revision: 9539
URL: http://svn.slimdevices.com/jive?rev=9539&view=rev
Log:
r79780@andy-imac (orig r9537): fmueller | 2011-09-21 05:00:20 -0400
Bug: 16100
Description: Fallback alarm - fix to make it sound from the speaker even
though headphones are plugged in
r79781@andy-imac (orig r9538): fmueller | 2011-09-21 05:02:38 -0400
Bug: 16100
Description: Fallback alarm - fix to make it sound from the speaker even
though headphones are plugged in
Modified:
7.7/trunk/ (props changed)
7.7/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
7.7/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
7.7/trunk/squeezeplay/src/squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyApplet.lua
Propchange: 7.7/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Wed Sep 21 08:07:26 2011
@@ -15,7 +15,7 @@
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:8423
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.5/private-branches/7.5.3-rc:9282
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.5/trunk:9408
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.6/trunk:9533
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.6/trunk:9538
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified:
7.7/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
URL:
http://svn.slimdevices.com/jive/7.7/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua?rev=9539&r1=9538&r2=9539&view=diff
==============================================================================
---
7.7/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
(original)
+++
7.7/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
Wed Sep 21 08:07:26 2011
@@ -446,6 +446,9 @@
self.localPlayer:volumeLocal(self.alarmVolume)
self.localPlayer:stop(true)
self.alarmInProgress = 'rtc'
+ -- Bug 16100 - Sound comes from headphones although Radio is set to use
speaker
+ -- We need to set a valid alarm state for the fallback case
+ self.localPlayer:setAlarmState("active_fallback")
self.localPlayer:playFileInLoop(self.alarmTone)
self.fadeInTimer = Timer(200,
function ()
@@ -498,7 +501,9 @@
log:warn('openAlarmWindow()', caller, ' ',
self.localPlayer:isConnected())
- self:_alarmThroughSpeakers()
+ -- Bug 16100 - Sound comes from headphones although Radio is set to use
speaker
+ -- Calling _alarmThroughSpeakers() here is too early for the fallback
alarm
+ --self:_alarmThroughSpeakers()
-- if UI is controlling a different player, switch to the local player
-- if notify_playerLoaded needs invocation prior to player change
taking effect then refire openAlarmWindow() at that time
@@ -557,6 +562,10 @@
log:error('openAlarmWindow: unknown caller')
end
+ -- Bug 16100 - Sound comes from headphones although Radio is set to use
speaker
+ -- Calling _alarmThroughSpeakers() here works for regular, fallback
alarm and snooze
+ self:_alarmThroughSpeakers()
+
if self.alarmWindow then
return
end
Modified: 7.7/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
URL:
http://svn.slimdevices.com/jive/7.7/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua?rev=9539&r1=9538&r2=9539&view=diff
==============================================================================
--- 7.7/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua (original)
+++ 7.7/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua Wed Sep 21
08:07:26 2011
@@ -1538,6 +1538,13 @@
return self.alarmState
end
+
+-- Bug 16100 - Sound comes from headphones although Radio is set to use speaker
+-- We need to be able to set the alarm state for fallback alarms
+function setAlarmState(self, state)
+ self.alarmState = state
+end
+
-- getPlayMode returns nil|stop|play|pause
--
function getPlayMode(self)
Modified:
7.7/trunk/squeezeplay/src/squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyApplet.lua
URL:
http://svn.slimdevices.com/jive/7.7/trunk/squeezeplay/src/squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyApplet.lua?rev=9539&r1=9538&r2=9539&view=diff
==============================================================================
---
7.7/trunk/squeezeplay/src/squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyApplet.lua
(original)
+++
7.7/trunk/squeezeplay/src/squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyApplet.lua
Wed Sep 21 08:07:26 2011
@@ -989,8 +989,8 @@
self.powerState = state
- -- Bug 16100, only setEndpoint if alarm is not active
- if self.player and (self.player:getAlarmState() == 'active' or
self.player:getAlarmState() == 'snooze') then
+ -- Bug 16100, only setEndpoint if alarm is not in state: active, snooze
or active_fallback
+ if self.player and (self.player:getAlarmState() == 'active' or
self.player:getAlarmState() == 'snooze' or self.player:getAlarmState() ==
'active_fallback') then
-- leave audio coming out speaker when alarm is active or in
snooze (alarm forces output out speaker)
log:info('Alarm either in progress or snooze, do not call
_setEndpoint()')
else
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins