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
=== modified file 'dropping-letters.qml'
--- dropping-letters.qml 2014-09-20 10:24:29 +0000
+++ dropping-letters.qml 2014-09-26 22:56:59 +0000
@@ -320,11 +320,10 @@
320 source: "Easy_Lemon_60_second.ogg"320 source: "Easy_Lemon_60_second.ogg"
321 autoPlay: volume.supportsMedia321 autoPlay: volume.supportsMedia
322 onStopped: {322 onStopped: {
323 if (volume.supportsMedia) {323 if (volume.supportsMedia && volume.audible) {
324 music.play();324 music.play();
325 }325 }
326 }326 }
327 muted: !volume.audible
328 }327 }
329 */328 */
330329
@@ -332,7 +331,6 @@
332 id: click331 id: click
333 source: "407__tictacshutup__click-1-off-click.ogg"332 source: "407__tictacshutup__click-1-off-click.ogg"
334 autoLoad: volume.supportsMedia333 autoLoad: volume.supportsMedia
335 muted: !volume.audible
336 audioRole: MediaPlayer.alert334 audioRole: MediaPlayer.alert
337 }335 }
338336
@@ -340,7 +338,6 @@
340 id: success338 id: success
341 source: "80921__justinbw__buttonchime02up.ogg"339 source: "80921__justinbw__buttonchime02up.ogg"
342 autoLoad: volume.supportsMedia340 autoLoad: volume.supportsMedia
343 muted: !volume.audible
344 audioRole: MediaPlayer.alert341 audioRole: MediaPlayer.alert
345 }342 }
346343
@@ -348,7 +345,6 @@
348 id: failure345 id: failure
349 source: "106727__kantouth__cartoon-bing-low.ogg"346 source: "106727__kantouth__cartoon-bing-low.ogg"
350 autoLoad: volume.supportsMedia347 autoLoad: volume.supportsMedia
351 muted: !volume.audible
352 audioRole: MediaPlayer.alert348 audioRole: MediaPlayer.alert
353 }349 }
354350
@@ -359,7 +355,6 @@
359 onStopped: {355 onStopped: {
360 flipable.flipped = false356 flipable.flipped = false
361 }357 }
362 muted: !volume.audible
363 audioRole: MediaPlayer.alert358 audioRole: MediaPlayer.alert
364 }359 }
365360
@@ -455,7 +450,7 @@
455 }450 }
456 function processSuggestedWord() {451 function processSuggestedWord() {
457 if (accum.isValid) {452 if (accum.isValid) {
458 if (volume.supportsMedia) {453 if (volume.supportsMedia && volume.audible) {
459 success.play();454 success.play();
460 }455 }
461 var thisscore = 0, wordlength = accum.text.length;456 var thisscore = 0, wordlength = accum.text.length;
@@ -471,7 +466,7 @@
471 scoredisplay.text = "" + (thisscore * wordlength);466 scoredisplay.text = "" + (thisscore * wordlength);
472 showscoredisplay.start();467 showscoredisplay.start();
473 } else {468 } else {
474 if (volume.supportsMedia) {469 if (volume.supportsMedia && volume.audible) {
475 failure.play();470 failure.play();
476 }471 }
477 accum.text = "";472 accum.text = "";
@@ -547,7 +542,7 @@
547 if (lm.get(idx).letters.count >= 10) {542 if (lm.get(idx).letters.count >= 10) {
548 droptimer.stop();543 droptimer.stop();
549 game.ended = true;544 game.ended = true;
550 if (volume.supportsMedia) {545 if (volume.supportsMedia && volume.audible) {
551 gameover.play();546 gameover.play();
552 }547 }
553 bestscore.updateScore(main.score);548 bestscore.updateScore(main.score);
@@ -631,7 +626,7 @@
631 if (!box.selected) {626 if (!box.selected) {
632 box.selected = true;627 box.selected = true;
633 accum.text += letter;628 accum.text += letter;
634 if (volume.supportsMedia) {629 if (volume.supportsMedia && volume.audible) {
635 click.play();630 click.play();
636 }631 }
637 main.selectedItems[main.selectedItems.length] = box;632 main.selectedItems[main.selectedItems.length] = box;

Subscribers

People subscribed via source and target branches