Merge lp:~vthompson/dropping-letters/fix-1350560 into lp:dropping-letters

Proposed by Victor Thompson
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 68
Merged at revision: 67
Proposed branch: lp:~vthompson/dropping-letters/fix-1350560
Merge into: lp:dropping-letters
Diff against target: 84 lines (+5/-10)
1 file modified
dropping-letters.qml (+5/-10)
To merge this branch: bzr merge lp:~vthompson/dropping-letters/fix-1350560
Reviewer Review Type Date Requested Status
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+236211@code.launchpad.net

Commit message

Only play sound if sound is on

Description of the change

Currently, it seems as though the Audio.muted property is not allowing the app to actually mute the playback. In either case, it would be smarter to not even play the sound effects if sound is off anyway.

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
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dropping-letters.qml'
2--- dropping-letters.qml 2014-09-20 10:24:29 +0000
3+++ dropping-letters.qml 2014-09-26 22:56:59 +0000
4@@ -320,11 +320,10 @@
5 source: "Easy_Lemon_60_second.ogg"
6 autoPlay: volume.supportsMedia
7 onStopped: {
8- if (volume.supportsMedia) {
9+ if (volume.supportsMedia && volume.audible) {
10 music.play();
11 }
12 }
13- muted: !volume.audible
14 }
15 */
16
17@@ -332,7 +331,6 @@
18 id: click
19 source: "407__tictacshutup__click-1-off-click.ogg"
20 autoLoad: volume.supportsMedia
21- muted: !volume.audible
22 audioRole: MediaPlayer.alert
23 }
24
25@@ -340,7 +338,6 @@
26 id: success
27 source: "80921__justinbw__buttonchime02up.ogg"
28 autoLoad: volume.supportsMedia
29- muted: !volume.audible
30 audioRole: MediaPlayer.alert
31 }
32
33@@ -348,7 +345,6 @@
34 id: failure
35 source: "106727__kantouth__cartoon-bing-low.ogg"
36 autoLoad: volume.supportsMedia
37- muted: !volume.audible
38 audioRole: MediaPlayer.alert
39 }
40
41@@ -359,7 +355,6 @@
42 onStopped: {
43 flipable.flipped = false
44 }
45- muted: !volume.audible
46 audioRole: MediaPlayer.alert
47 }
48
49@@ -455,7 +450,7 @@
50 }
51 function processSuggestedWord() {
52 if (accum.isValid) {
53- if (volume.supportsMedia) {
54+ if (volume.supportsMedia && volume.audible) {
55 success.play();
56 }
57 var thisscore = 0, wordlength = accum.text.length;
58@@ -471,7 +466,7 @@
59 scoredisplay.text = "" + (thisscore * wordlength);
60 showscoredisplay.start();
61 } else {
62- if (volume.supportsMedia) {
63+ if (volume.supportsMedia && volume.audible) {
64 failure.play();
65 }
66 accum.text = "";
67@@ -547,7 +542,7 @@
68 if (lm.get(idx).letters.count >= 10) {
69 droptimer.stop();
70 game.ended = true;
71- if (volume.supportsMedia) {
72+ if (volume.supportsMedia && volume.audible) {
73 gameover.play();
74 }
75 bestscore.updateScore(main.score);
76@@ -631,7 +626,7 @@
77 if (!box.selected) {
78 box.selected = true;
79 accum.text += letter;
80- if (volume.supportsMedia) {
81+ if (volume.supportsMedia && volume.audible) {
82 click.play();
83 }
84 main.selectedItems[main.selectedItems.length] = box;

Subscribers

People subscribed via source and target branches