LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   no audio device for play/playwave commands (https://www.linuxquestions.org/questions/fedora-35/no-audio-device-for-play-playwave-commands-617088/)

marozsas 01-29-2008 05:04 AM

no audio device for play/playwave commands
 
Dear friends,

I used to use the command line play and playwave commands in bash scripts, to play a sound when a milestone is reached in my multi-phase backup script.

In fedora 8, after Pulse audio system is not working any more.

However, KDE/Gnome programs can play music just fine. MPlayer/Totem can play movies with audio without problems too.
The Fedora8 tool in the System/Preferences/Hardware/Sound can play any sample sounds in the Sounds tab of Sound Preferences.

Looks like only play and playwave commands are not working. The error message is:
Code:

[miguel@oldbit ~]$ playwave /usr/share/sounds/k3b_success1.wav
Couldn't open audio: No available audio device
[miguel@oldbit ~]$ play /usr/share/sounds/k3b_success1.wav
*** PULSEAUDIO: Unable to connect: Connection refused
play stio: Failed writing default: cannot open audio device
[miguel@oldbit ~]$

How can I play sounds with commands play/playwave in Fedora8/Pulse ?

dive 01-30-2008 02:16 PM

Do you have alsa installed? Try 'aplay sound.wav'

marozsas 02-01-2008 04:42 AM

fixed but not explained
 
I tried aplay, but I got a similar message.

I have tried to create a new user and for my surprise the play/aplay commands for this new user works !

Well, was not entirely a surprise, once I got a similar problem and I solved just by moving, piece by piece, my user environment from the one account to the working one.

So it is something in my environment, not in the system itself. A tried to clean as much I can the environments variables, but not luck. I think it can be a corrupted configuration file somewhere ?

Thank you !


All times are GMT -5. The time now is 01:30 PM.