Merge lp:~gang65/ubuntu-clock-app/ubuntu-clock-volume-preview into lp:ubuntu-clock-app

Proposed by Bartosz Kosiorek
Status: Work in progress
Proposed branch: lp:~gang65/ubuntu-clock-app/ubuntu-clock-volume-preview
Merge into: lp:ubuntu-clock-app
Diff against target: 71 lines (+21/-3)
2 files modified
app/alarm/AlarmSettingsPage.qml (+14/-2)
debian/changelog (+7/-1)
To merge this branch: bzr merge lp:~gang65/ubuntu-clock-app/ubuntu-clock-volume-preview
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ricardo Salveti (community) Needs Fixing
Bartosz Kosiorek Needs Information
Riccardo Padovani Needs Information
Victor Thompson Needs Information
Review via email: mp+264783@code.launchpad.net

Commit message

Play background sound during volume slider changes (LP: #1362078)

Description of the change

Play background sound during volume slider changes (LP: #1362078)

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

48 + previewAlarmVolume.source = "/usr/share/sounds/ubuntu/ringtones/Suru arpeggio.ogg"

The preview should be with the actual ringtone, now with an hardcoded one

review: Needs Fixing
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

In the clock app you cannot set alarm ringtone globally, but the volume of alarms is set globally. You could customize ringtone for every alarm, and not globally.
So:
1. The alarm volume is global (for all alarms) - you cannot set different volume for every alarm.
2. The alarm ringtone is per alarm.
That's why I selected default ringtone for volume preview

Revision history for this message
Victor Thompson (vthompson) wrote :

I agree with Bartosz.

I'm not sure the alarm tone preview is varying with the value of the slider, however. When I move it from one end to the other the volume does not seem to change.

review: Needs Information
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

Indeed, sorry for the wrong review.

+ alarmSettings.volume = value
+ previewAlarmVolume.volume = value/100

Why you set the volume of the preview at 1/100 of the actual volume?
Also, why did you drop the call to formatValue()?

review: Needs Information
Revision history for this message
Victor Thompson (vthompson) wrote :

The reason he is dividing by 100 is because the slider value is 1 to 100
and the volume variable is from 0 to 1.

On Sun, Jul 19, 2015 at 12:40 PM, Riccardo Padovani <email address hidden>
wrote:

> Review: Needs Information
>
> Indeed, sorry for the wrong review.
>
> + alarmSettings.volume = value
> + previewAlarmVolume.volume = value/100
>
> Why you set the volume of the preview at 1/100 of the actual volume?
> Also, why did you drop the call to formatValue()?
> --
>
> https://code.launchpad.net/~gang65/ubuntu-clock-app/ubuntu-clock-volume-preview/+merge/264783
> You are reviewing the proposed merge of
> lp:~gang65/ubuntu-clock-app/ubuntu-clock-volume-preview into
> lp:ubuntu-clock-app.
>

Revision history for this message
Riccardo Padovani (rpadovani) wrote :

I need an holiday.

Revision history for this message
Bartosz Kosiorek (gang65) wrote :

Hello Ricardo Salveti.

Could you please take a look at this MR and give your advice how to resolve this issue.
I suspect wrong Volume which I'm using.

Thanks in advance
Bartosz

review: Needs Information
Revision history for this message
Victor Thompson (vthompson) wrote :

Actually, I wonder if you need to cast the division so you get a decimal value. Could you try changing "value/100" to "1.0*value/100"?

Revision history for this message
Ricardo Salveti (rsalveti) :
review: Needs Fixing
299. By Bartosz Kosiorek

Merge with trunk

300. By Bartosz Kosiorek

Change audio role for volume preview to alarm

301. By Bartosz Kosiorek

Fix manifest file

302. By Bartosz Kosiorek

Updated translation template

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

One thing to note is that when I make the following change, any value from the slider results in "VOLUME: 0"

=== modified file 'app/alarm/AlarmSettingsPage.qml'
--- app/alarm/AlarmSettingsPage.qml 2015-07-29 19:35:00 +0000
+++ app/alarm/AlarmSettingsPage.qml 2015-08-07 22:35:02 +0000
@@ -35,7 +35,7 @@

     Audio {
         id: previewAlarmVolume
         audioRole: MediaPlayer.alarm
+ onVolumeChanged: console.log("VOLUME: ", volume)
     }

303. By Bartosz Kosiorek

Merge with trunk

304. By Bartosz Kosiorek

Play background sound during volume slider changes (LP: #1362078)

Unmerged revisions

304. By Bartosz Kosiorek

Play background sound during volume slider changes (LP: #1362078)

303. By Bartosz Kosiorek

Merge with trunk

302. By Bartosz Kosiorek

Updated translation template

301. By Bartosz Kosiorek

Fix manifest file

300. By Bartosz Kosiorek

Change audio role for volume preview to alarm

299. By Bartosz Kosiorek

Merge with trunk

298. By Bartosz Kosiorek

Play background sound during volume slider changes (LP: #1362078)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/alarm/AlarmSettingsPage.qml'
2--- app/alarm/AlarmSettingsPage.qml 2015-10-06 21:22:34 +0000
3+++ app/alarm/AlarmSettingsPage.qml 2015-10-22 12:06:37 +0000
4@@ -16,11 +16,14 @@
5 * along with this program. If not, see <http://www.gnu.org/licenses/>.
6 */
7
8+
9 import QtQuick 2.4
10 import QtQuick.Layouts 1.1
11+import QtMultimedia 5.0
12 import WorldClock 1.0
13 import Alarm 1.0
14 import Ubuntu.Components 1.2
15+import Ubuntu.Settings.Menus 0.1 as Menus
16 import "../components"
17
18 Page {
19@@ -30,6 +33,11 @@
20 visible: false
21 flickable: settingsPlugin
22
23+ Audio {
24+ id: previewAlarmVolume
25+ audioRole: MediaPlayer.alarm
26+ }
27+
28 Connections {
29 target: clockApp
30 onApplicationStateChanged: {
31@@ -100,7 +108,7 @@
32 }
33 }
34
35- Slider {
36+ Menus.SliderMenu {
37 anchors {
38 left: parent.left
39 right: parent.right
40@@ -110,10 +118,14 @@
41
42 minimumValue: 1
43 maximumValue: 100
44+ live: true
45 value: alarmSettings.volume
46
47 onValueChanged: {
48- alarmSettings.volume = formatValue(value)
49+ alarmSettings.volume = value
50+ previewAlarmVolume.volume = value/100
51+ previewAlarmVolume.source = "/usr/share/sounds/ubuntu/ringtones/Suru arpeggio.ogg"
52+ previewAlarmVolume.play()
53 }
54 }
55 }
56
57=== modified file 'debian/changelog'
58--- debian/changelog 2015-10-16 05:58:01 +0000
59+++ debian/changelog 2015-10-22 12:06:37 +0000
60@@ -1,4 +1,10 @@
61-ubuntu-clock-app (3.6) UNRELEASED; urgency=medium
62+ubuntu-clock-app (3.7) UNRELEASED; urgency=medium
63+
64+ * Play background sound during volume slider changes (LP: #1362078)
65+
66+ -- Bartosz Kosiorek <gang65@poczta.onet.pl> Thu, 22 Oct 2015 14:05:11 +0200
67+
68+ubuntu-clock-app (3.6) vivid; urgency=high
69
70 [ Nekhelesh Ramananthan ]
71 * Bumped version to 3.6

Subscribers

People subscribed via source and target branches