Author: fmueller
Date: Wed Sep 21 02:00:20 2011
New Revision: 9537
URL: http://svn.slimdevices.com/jive?rev=9537&view=rev
Log:
Bug: 16100
Description: Fallback alarm - fix to make it sound from the speaker even though
headphones are plugged in
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua?rev=9537&r1=9536&r2=9537&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
Wed Sep 21 02:00:20 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.6/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua?rev=9537&r1=9536&r2=9537&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua (original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua Wed Sep 21
02:00:20 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)
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins