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.
"s play -block 1"
(file "./play.sh" line 8)
Errors "Unable to open mixer /dev/mixer", "Could not gain access to /dev/sound/dsp for writing", no sound
play.sh script should play sound.
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.
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.
[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
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.
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.
tcl-snack-2.2.10-11.fc11 has been submitted as an update for Fedora 11.
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.