No sound from 'play'
I have a script that monitors things and notifies me with sound. It uses the 'play' command to play sounds.
It was working fine. I put the computer to sleep (suspend to RAM) and went to sleep myself. Then I woke up, woke the computer up, and noticed the script is silent. Testing 'play' on command line, it is definitely silent. Other audio programs work fine, such as Audacious or even Youtube. Only 'play' is silent. I rebooted. Problem remains. How does that even happen, and how can I fix it? |
Quote:
|
Code:
luc[17357-0]> play /home/luc/sounds/Abrir.wav Code:
luc[17358-0]> play -V4 /home/luc/sounds/Abrir.wav |
$ cat /proc/asound/cards
If your indexing changed for your cards, you might need to override the defaults. Audio gets odd these days since webcams, video cards, motherboards, and probably other things have soundcards on them. So which one gets used by default can change between boots and various configurations. Without configuration, the card with index 0 is the default. $ play -d /home/luc/sounds/Abrir.wav I guess you can have a built in default soundcard (for SoX at compile time?). On my system which outputs primarily to pulseaudio over a network, play -d outputs no audio (until ^C is pressed once), and play with no -d outputs to pulse with no delay. If you're using pulseaudio you can run pavucontrol while play is outputting sound and change the settings. Since you can have per application configs, that's one way to change them, and the issue might be that that got corrupted or otherwise changed. Beyond that you might be pointing at the wrong card, which is super easy to do these days. |
Quote:
Code:
luc[17378-0]> cat /proc/asound/cards Quote:
|
loopback is odd. AFAIK, it is used if you want to output to a file or anything besides your speakers. It is 0 so for some things that would be default. If you don't currently have a .asoundrc, does this fix it?
FILE: ~/.asoundrc Code:
defaults.ctl.card 1 |
These changes to .asoundrc didn't work. I have tried other changes, and they didn't work either.
Please read this other thread of mine if you're interested: http://www.linuxquestions.org/questi...ds-4175600743/ It could be related, but note that thread is from February 28 and 'play' worked fine in the meantime, including several reboots. |
Create a new user, and reboot and log into that user. See if the issue persists. Be sure to add the user to the audio group.
|
Quote:
|
Well that rules out configs in the /home/ path. So you're looking at configs in / or /etc/ or something else. Although most of those types of issues would affect ALL applications, not just "play". Perhaps uninstall and reinstall sox. Or just reinstall sox.
$ sudo apt-get install --reinstall sox Bit rot, corruption or something else happened. |
...
have you ever tried playing this file with another application? have you ever tried playing another file with this application? Quote:
|
Quote:
Quote:
|
Quote:
|
The syntax of sox (and therefor play) has changed a lot over the years. What is the exact command being attempted? And what is the deets on the file being attempted?
$ avprobe /home/luc/sounds/Abrir.wav or ffprobe depending on your system. |
Quote:
anyhow, have you tried giving it a precise definition of the format you are feeding it, instead of relying on its auto-detection? does sox use its own audio decoding libraries, or does it rely on others? is your system (debian jessie i presume) up-to-date, is sox from the standard repositories, did you reboot after system upgrade? |
All times are GMT -5. The time now is 09:39 AM. |