Bug 1270488

Summary: iagno: Wrong filepath for soundfiles
Product: [Fedora] Fedora Reporter: Adri Verhoef <bugzilla>
Component: iagnoAssignee: Matthias Clasen <mclasen>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 22CC: bugzilla, mcatanzaro+wrong-account-do-not-cc, mclasen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-10 18:22:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adri Verhoef 2015-10-10 10:05:06 UTC
Description of problem:
Game reports that there is an error when playing the soundfiles:

** (iagno:28579): WARNING **: iagno.vala:510: Error playing file: flip-piece.ogg
filepath should be:/usr/share/iagno/sounds/flip-piece.ogg


** (iagno:28579): WARNING **: iagno.vala:510: Error playing file: gameover.ogg
filepath should be:/usr/share/iagno/sounds/gameover.ogg

Game plays without sound.

Version-Release number of selected component (if applicable):
iagno-3.16.1-1.fc22.x86_64

How reproducible:
In a terminal.

Steps to Reproduce:
1. Start a terminal.
2. Start a game of 'iagno' by typing 'iagno'.
3. Start playing by making moves.

Actual results:
The error messages start appearing after each move when playing.
No sound.

Expected results:
Game without error messages and with sound.
A space between 'should be:' and '/usr/share/...'.

Additional info:
The files are actually there:
-rw-r--r--. 1 root root 7021 Apr 16 21:21 /usr/share/iagno/sounds/flip-piece.ogg
-rw-r--r--. 1 root root 8175 Apr 16 21:21 /usr/share/iagno/sounds/gameover.ogg

Comment 1 Michael Catanzaro 2015-10-10 16:00:47 UTC
Hm, the error message is useless. I've attempted to fix the error message in: https://git.gnome.org/browse/iagno/commit/?id=1c9c2a8ff857c7b8a2b03ed5e2c60d6489c4087c

Please install iagno-3.16.1-2.fc22.x86_64.rpm from here to get the improved error message: https://people.gnome.org/~mcatanzaro/iagno-sound-issue/

Then try it out and report the error message you get, so we have a chance to figure out what's wrong. Thanks!

Comment 2 Adri Verhoef 2015-10-10 16:40:10 UTC
I did as you suggested and installed iagno-3.16.1-2.fc22.x86_64.rpm from https://people.gnome.org/~mcatanzaro/iagno-sound-issue/.  Then I played a game of iagno and this is what I got:

** (iagno:28852): WARNING **: iagno.vala:510: Error playing /usr/share/iagno/sounds/flip-piece.ogg: Sound disabled


** (iagno:28852): WARNING **: iagno.vala:510: Error playing /usr/share/iagno/sounds/flip-piece.ogg: Sound disabled

I thought that it might be due to an already playing stream, so I quit that stream, checked that nothing else was playing and started another game of iagno.  Alas, the same thing happened:

** (iagno:28871): WARNING **: iagno.vala:510: Error playing /usr/share/iagno/sounds/flip-piece.ogg: Sound disabled


** (iagno:28871): WARNING **: iagno.vala:510: Error playing /usr/share/iagno/sounds/gameover.ogg: Sound disabled

Comment 3 Adri Verhoef 2015-10-10 17:40:32 UTC
Searching for "Sound disabled" I found this page http://ubuntuforums.org/showthread.php?t=1502828 where it says: "if the user has disabled system alert sounds (System->Preferences->Volume Control, Sound theme: No theme), you'll get: [..] Sound disabled".

Then I found https://bugzilla.redhat.com/show_bug.cgi?id=915121#c6 which says that if you have system sounds disabled, it'll say "Sound disabled".  That's why this happens:

$ canberra-gtk-play -f /usr/share/iagno/sounds/flip-piece.ogg
Failed to play sound: Sound disabled

Comment 4 Michael Catanzaro 2015-10-10 18:22:21 UTC
OK, great. So it sounds like this is not a bug (besides the poor error message), right? If you still think there is a bug, I can reassign this to libcanberra.

Comment 5 Adri Verhoef 2015-10-10 19:01:03 UTC
Thanks for improving the error message, Michael.

The way to enable the system sounds in my XFCE desktop environment is:
Settings Manager -> Appearance -> Settings -> enable "Enable event sounds" :-)

After enabling the system sounds the error messages don't show up.  Great work!