Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
luc[17357-0]> play /home/luc/sounds/Abrir.wav
/home/luc/sounds/Abrir.wav:
File Size: 10.6k Bit Rate: 434k
Encoding: Signed PCM
Channels: 1 @ 16-bit
Samplerate: 22050Hz
Replaygain: off
Duration: 00:00:00.20
In:100% 00:00:00.20 [00:00:00.00] Out:8.66k [ ===|=== ] Clip:0
Done.
Code:
luc[17358-0]> play -V4 /home/luc/sounds/Abrir.wav
play DBUG formats: opening format plugin `lsx_alsa_format_fn': library 0x152c680, entry point 0x7f9d3cda88e0
play DBUG formats: opening format plugin `lsx_amr_nb_format_fn': library 0x152dde0, entry point 0x7f9d3c6a4690
play DBUG formats: opening format plugin `lsx_amr_wb_format_fn': library 0x152eb80, entry point 0x7f9d3c2761a0
play DBUG formats: opening format plugin `lsx_caf_format_fn': library 0x152f8f0, entry point 0x7f9d3be5c610
play DBUG formats: opening format plugin `lsx_fap_format_fn': library 0x1531f50, entry point 0x7f9d3b0d1610
play DBUG formats: opening format plugin `lsx_flac_format_fn': library 0x1532730, entry point 0x7f9d3aecc600
play DBUG formats: opening format plugin `lsx_gsm_format_fn': library 0x1533630, entry point 0x7f9d3aabf050
play DBUG formats: opening format plugin `lsx_lpc10_format_fn': library 0x15335a0, entry point 0x7f9d3a8bc0e0
play DBUG formats: opening format plugin `lsx_mat4_format_fn': library 0x1533d70, entry point 0x7f9d3a6b6620
play DBUG formats: opening format plugin `lsx_mat5_format_fn': library 0x1534fb0, entry point 0x7f9d3a4b0610
play DBUG formats: opening format plugin `lsx_paf_format_fn': library 0x1535790, entry point 0x7f9d3a2aa610
play DBUG formats: opening format plugin `lsx_pvf_format_fn': library 0x1535f70, entry point 0x7f9d3a0a4610
play DBUG formats: opening format plugin `lsx_sd2_format_fn': library 0x1533420, entry point 0x7f9d39e9e610
play DBUG formats: opening format plugin `lsx_sndfile_format_fn': library 0x15370a0, entry point 0x7f9d39c9a4f0
play DBUG formats: opening format plugin `lsx_vorbis_format_fn': library 0x1537860, entry point 0x7f9d39a96010
play DBUG formats: opening format plugin `lsx_w64_format_fn': library 0x1538000, entry point 0x7f9d3988f610
play DBUG formats: opening format plugin `lsx_wavpack_format_fn': library 0x15387e0, entry point 0x7f9d3968baa0
play DBUG formats: opening format plugin `lsx_xi_format_fn': library 0x1539590, entry point 0x7f9d3925b600
play: SoX v14.4.1
time: Dec 24 2014 20:00:19
issue: Debian
uname: Linux luc 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64
compiler: gcc 4.9.2
arch: 1288 48 88 L OMP
play INFO formats: detected file format type `wav'
play DBUG wav: WAV Chunk fmt
play DBUG wav: WAV Chunk data
play DBUG wav: Reading Wave file: Microsoft PCM format, 1 channel, 22050 samp/sec
play DBUG wav: 44100 byte/sec, 2 block align, 16 bits/samp, 8660 data bytes
play DBUG wav: 4330 Samps/chans
play DBUG wav: WAV Chunk LIST
play DBUG wav: Type INFO
play DBUG wav: Attempting to seek beyond unsupported chunk `ICOP' of length 32 bytes
play DBUG wav: Attempting to seek beyond unsupported chunk `DISP' of length 35 bytes
play DBUG wav: Attempting to seek beyond unsupported chunk `DISP' of length 1836 bytes
Input File : '/home/luc/sounds/Abrir.wav'
Channels : 1
Sample Rate : 22050
Precision : 16-bit
Duration : 00:00:00.20 = 4330 samples ~ 14.7279 CDDA sectors
File Size : 10.6k
Bit Rate : 434k
Sample Encoding: 16-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
play DBUG alsa: selecting format 2: S16_LE (Signed 16 bit Little Endian)
play INFO formats: can't set sample rate 22050; using 44100
Output File : 'default' (alsa)
Channels : 1
Sample Rate : 44100
Precision : 16-bit
Duration : 00:00:00.10 = 4330 samples = 7.36395 CDDA sectors
Sample Encoding: 16-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
play DBUG rate: i/o=0.5; 1:2 @ level 0
play DBUG effects_i_dsp: 0.724 0.161984 1
play DBUG effects_i_dsp: make_lpf(n=83, Fc=0.419008 beta=10.6185 dc-norm=1 scale=2)
play DBUG rate: fir_len=42 phases=2 coef_interp=0 mult=1 size=672
play DBUG rate: stage=0 pre_post=41 pre=0 preload=20
play INFO sox: effects chain: input 22050Hz 1 channels (multi) 16 bits 00:00:00.20
play INFO sox: effects chain: rate 44100Hz 1 channels 32 bits 00:00:00.20
play INFO sox: effects chain: dither 44100Hz 1 channels 16 bits 00:00:00.20
play INFO sox: effects chain: output 44100Hz 1 channels (multi) 16 bits 00:00:00.20
play DBUG sox: automatically entering interactive mode
In:100% 00:00:00.20 [00:00:00.00] Out:8.66k [ ===|=== ] Clip:0
Done.
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.
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?
The rough equivalent of -D hw:1,0 as far as alsa would be concerned. That config would make alsa default to device 1. Which wouldn't matter in the case of pulseaudio. But not all thing use pulse, and configurations of various distros favor different things.
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.
have you ever tried playing this file with another application?
have you ever tried playing another file with this application?
Quote:
Originally Posted by lucmove
Code:
luc[17358-0]> play -V4 /home/luc/sounds/Abrir.wav
play DBUG formats: opening format plugin `lsx_alsa_format_fn': library 0x152c680, entry point 0x7f9d3cda88e0
play DBUG formats: opening format plugin `lsx_amr_nb_format_fn': library 0x152dde0, entry point 0x7f9d3c6a4690
play DBUG formats: opening format plugin `lsx_amr_wb_format_fn': library 0x152eb80, entry point 0x7f9d3c2761a0
play DBUG formats: opening format plugin `lsx_caf_format_fn': library 0x152f8f0, entry point 0x7f9d3be5c610
play DBUG formats: opening format plugin `lsx_fap_format_fn': library 0x1531f50, entry point 0x7f9d3b0d1610
play DBUG formats: opening format plugin `lsx_flac_format_fn': library 0x1532730, entry point 0x7f9d3aecc600
play DBUG formats: opening format plugin `lsx_gsm_format_fn': library 0x1533630, entry point 0x7f9d3aabf050
play DBUG formats: opening format plugin `lsx_lpc10_format_fn': library 0x15335a0, entry point 0x7f9d3a8bc0e0
play DBUG formats: opening format plugin `lsx_mat4_format_fn': library 0x1533d70, entry point 0x7f9d3a6b6620
play DBUG formats: opening format plugin `lsx_mat5_format_fn': library 0x1534fb0, entry point 0x7f9d3a4b0610
play DBUG formats: opening format plugin `lsx_paf_format_fn': library 0x1535790, entry point 0x7f9d3a2aa610
play DBUG formats: opening format plugin `lsx_pvf_format_fn': library 0x1535f70, entry point 0x7f9d3a0a4610
play DBUG formats: opening format plugin `lsx_sd2_format_fn': library 0x1533420, entry point 0x7f9d39e9e610
play DBUG formats: opening format plugin `lsx_sndfile_format_fn': library 0x15370a0, entry point 0x7f9d39c9a4f0
play DBUG formats: opening format plugin `lsx_vorbis_format_fn': library 0x1537860, entry point 0x7f9d39a96010
play DBUG formats: opening format plugin `lsx_w64_format_fn': library 0x1538000, entry point 0x7f9d3988f610
play DBUG formats: opening format plugin `lsx_wavpack_format_fn': library 0x15387e0, entry point 0x7f9d3968baa0
play DBUG formats: opening format plugin `lsx_xi_format_fn': library 0x1539590, entry point 0x7f9d3925b600
play: SoX v14.4.1
time: Dec 24 2014 20:00:19
issue: Debian
uname: Linux luc 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64
compiler: gcc 4.9.2
arch: 1288 48 88 L OMP
play INFO formats: detected file format type `wav'
play DBUG wav: WAV Chunk fmt
play DBUG wav: WAV Chunk data
play DBUG wav: Reading Wave file: Microsoft PCM format, 1 channel, 22050 samp/sec
play DBUG wav: 44100 byte/sec, 2 block align, 16 bits/samp, 8660 data bytes
play DBUG wav: 4330 Samps/chans
play DBUG wav: WAV Chunk LIST
play DBUG wav: Type INFO
play DBUG wav: Attempting to seek beyond unsupported chunk `ICOP' of length 32 bytes
play DBUG wav: Attempting to seek beyond unsupported chunk `DISP' of length 35 bytes
play DBUG wav: Attempting to seek beyond unsupported chunk `DISP' of length 1836 bytes
Input File : '/home/luc/sounds/Abrir.wav'
Channels : 1
Sample Rate : 22050
Precision : 16-bit
Duration : 00:00:00.20 = 4330 samples ~ 14.7279 CDDA sectors
File Size : 10.6k
Bit Rate : 434k
Sample Encoding: 16-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
play DBUG alsa: selecting format 2: S16_LE (Signed 16 bit Little Endian)
play INFO formats: can't set sample rate 22050; using 44100
Output File : 'default' (alsa)
Channels : 1
Sample Rate : 44100
Precision : 16-bit
Duration : 00:00:00.10 = 4330 samples = 7.36395 CDDA sectors
Sample Encoding: 16-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
play DBUG rate: i/o=0.5; 1:2 @ level 0
play DBUG effects_i_dsp: 0.724 0.161984 1
play DBUG effects_i_dsp: make_lpf(n=83, Fc=0.419008 beta=10.6185 dc-norm=1 scale=2)
play DBUG rate: fir_len=42 phases=2 coef_interp=0 mult=1 size=672
play DBUG rate: stage=0 pre_post=41 pre=0 preload=20
play INFO sox: effects chain: input 22050Hz 1 channels (multi) 16 bits 00:00:00.20
play INFO sox: effects chain: rate 44100Hz 1 channels 32 bits 00:00:00.20
play INFO sox: effects chain: dither 44100Hz 1 channels 16 bits 00:00:00.20
play INFO sox: effects chain: output 44100Hz 1 channels (multi) 16 bits 00:00:00.20
play DBUG sox: automatically entering interactive mode
In:100% 00:00:00.20 [00:00:00.00] Out:8.66k [ ===|=== ] Clip:0
Done.
i don't know, it looks like sox has difficulties identifying the file format.
Note that uninstalling sox caused removal of something called terminatorX because it depends on sox. Before I proceeded, I ran terminatorX and it played normally. Then I uninstalled and reinstalled them, and nothing changed. :-(
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.