Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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 bunch of .wav files that I play regularly. I play them on both my Windows 7 box and my Fedora box (I have copies on both computers). On the Fedora machine I have used Rhythm Box and Totem and the .wav files play just fine.
When I try to use sox (either 'play filename.wav' or 'sox filename.wav -d') it's really screwy. The .wav files play very fast and are very stilted (skipping).
I am really completely ignorant about the wav files. I just recorded them from my CDs many moons ago on an older Windows XP machine.
So, when I went to *try* some of the many, many, many (and complicated, complicated, complicated) sox command-line options I didn't have luck getting them to play nicely. All I was able to achieve was to slow the song down so it didn't sound like a chipmunk - but like a person; but it was still stilted - skipping - a bunch.
About a year ago on an earlier version of Fedora sox was working just fine for me - and these same wav files. I even popped it (sox) into a ksh script to randomly play songs. But the current version of sox won't work. 2 days ago I reinstalled it (yum) - but still no luck, it plays the same.
I want to use sox again and be able to use the ksh script to play them randomly.
So what can I do (?):
a) I am ignorant about the wav files themselves (other than file size)
b) the wav files work fine under a bunch of other applications and platforms (so they are OK)
Any help is appreciated!
Matt
Last edited by matt_thumper; 02-15-2011 at 08:23 AM.
This is not really an answer to your question, but why don't you use a lossless codec such as FLAC? It will reduce the size of your files but retain perfect quality (WAV files have no compression).
It would be a lot easier to diagnose your problem had you provided the sox version you're using and your distro. My first guess is that some audio server is running. Try "killall pulseaudio" and " killall artsd" and "killall esd". Try upgrading your package to the latest version. Try using alsa instead of oss for output.
The symptoms sounds like the headers for the files are odd and sox is having difficulty assuming the right specs of the content. It could also be that the syntax you're using in not compatible with your sox version. Or something else odd is going on. dmix, pulse audio, esd, artsd, jackd, ... or other things fighting for resources. Or everything is trying to work at the same nice level. You might try launching the less important things with a nice -n 19 <command> to make things play nicer with each other. When I'm editing video and such I've adopted that route. It lets me use the computer for other things while something that's going to take a while is processing.
If it's headers, perhaps explicitly stating them will help.
$ play -s -2 -c 2 -r 44100 file.wav
(Syntax may vary depending on sox version. And content being played.)
Of course with linux you have several player options to choose from.
aplay
mplayer
ffplay
...
...
...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.