Bug 505219 - tcl-snack doesn't produce any sound
Summary: tcl-snack doesn't produce any sound
Alias: None
Product: Fedora
Classification: Fedora
Component: tcl-snack
Version: 11
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-06-11 04:30 UTC by Mikhail Kalenkov
Modified: 2009-07-23 19:05 UTC (History)
1 user (show)

Fixed In Version: 2.2.10-11.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-07-23 19:05:17 UTC

Attachments (Terms of Use)

Description Mikhail Kalenkov 2009-06-11 04:30:22 UTC
Description of problem: tcl-snack package distributed with Fedora 11 doesn't work (no sound).

Version-Release number of selected component (if applicable):

How reproducible: Always

Steps to Reproduce:
[mkalenkov@sadki Desktop]$ cat play.sh
# the next line restarts using tclsh \
exec tclsh8.5 "$0" "$@"
package require -exact sound 2.2

set file [lindex $argv 0]
snack::sound s -file $file
s play -block 1
[mkalenkov@sadki Desktop]$ ./play.sh /usr/share/sounds/login.wav
Unable to open mixer /dev/mixer
Could not gain access to /dev/sound/dsp for writing.
    while executing
"s play -block 1"
    (file "./play.sh" line 8)
[mkalenkov@sadki Desktop]$
Actual results:
Errors "Unable to open mixer /dev/mixer", "Could not gain access to /dev/sound/dsp for writing", no sound

Expected results:
play.sh script should play sound.

Additional info:
I have recompiled tcl-snack-2.2.10-10.fc11.src.rpm package with --enable-alsa flag and it fixed this bug. By the way, I haven't neither /dev/mixer nor /dev/sound/dsp files. I wonder is it normal (F-11 i386)?

PS Some time ago (bug 463259) I asked to build tcl-snack package without ALSA support, because otherwise tcl-snack didn't produce any sound output on my Fedora 10 box. Now the situation is opposite.

Comment 1 Mikhail Kalenkov 2009-06-11 05:07:24 UTC
Some additional investigations reveal that tcl-snack package with ALSA support is not perfect. I found that script play.sh (see the first message) doesn't play entire wav file. It doesn't play some part at the end of the wav file.

for instance
[mkalenkov@sadki Desktop]$ ./play.sh /usr/share/sounds/question.wav
I didn't hear any sound output, because wav file is too short, but

[mkalenkov@sadki Desktop]$ play /usr/share/sounds/question.wav 


  Encoding: Signed PCM    
  Channels: 2 @ 16-bit   
Samplerate: 44100Hz      
Replaygain: off         
  Duration: 00:00:00.06  

In:100%  00:00:00.06 [00:00:00.00] Out:2.67k [   ===|===   ]        Clip:0    

I hear sound output. If the wav file is larger, then play.sh plays everything with exception of some short part at the end of the wav file.

[mkalenkov@sadki Desktop]$ rpm -qf /usr/share/sounds/question.wav
[mkalenkov@sadki Desktop]$ type play
play is hashed (/usr/bin/play)
[mkalenkov@sadki Desktop]$ rpm -qf /usr/bin/play

play.sh is a script (simplified) from snack tarball.

Comment 2 Tom "spot" Callaway 2009-07-22 21:33:22 UTC
For what it is worth, with alsa enabled, I can play question.wav without problems.

I'm not sure what more I can do here, the upstream for libsnack is very much inactive, and I'm not an expert on ALSA. None of the other distros have any better fixes for this code.

I'm going to kick off a build for rawhide and Fedora 11 with ALSA support enabled.

Comment 3 Fedora Update System 2009-07-22 22:29:05 UTC
tcl-snack-2.2.10-11.fc11 has been submitted as an update for Fedora 11.

Comment 4 Fedora Update System 2009-07-23 19:05:12 UTC
tcl-snack-2.2.10-11.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.