LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-04-2006, 11:47 PM   #1
rignes
Member
 
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Rep: Reputation: 30
Sox not exiting when used in a pipe


I've run into a very odd problem. I use gnump3d to stream my music to work from my house and it uses sox and oggenc in a pipe to downsample the music to be more bandwidth friendly. This has worked fine until the latest sox upgrade in slackware-current.

More specifically, using the older version of sox that come with Slack (sox-12.17.8) I have no problems. When the downsampling is finished sox exits. I use this pipe in this version of sox:

downsample_high_ogg = sox -c 2 -t ogg $FILENAME -t raw - | oggenc --raw -b 96 -
downsample_medium_ogg = sox -c 2 -t ogg $FILENAME -t raw - | oggenc --raw -b 64 -
downsample_low_ogg = sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -

Those are the three lines in gnump3d.conf that corrispond to the three levels of downsampling. However, when I upgrade to sox-12.18.1 I have to update the pipes to:

downsample_high_ogg = sox -c 2 -t ogg $FILENAME -t raw -s - | oggenc --raw -b 96 -
downsample_medium_ogg = sox -c 2 -t ogg $FILENAME -t raw -s - | oggenc --raw -b 64 -
downsample_low_ogg = sox -t ogg $FILENAME -t raw -s - | oggenc --raw --downmix --resample 22050 -b 32 -

These actually work and I get sound, however, sox does not exit when it is finished with a track. I end up with an instance of sox just hanging about in memory for each track I've played and eventually my system grinds to a halt.

I have no idea what the cause is. Google hasn't been much help for me but I may be searching on the wrong terms. Anyone have any suggestions on what I might try to get sox to terminate correctly?

Thanks,

Brian
 
Old 08-06-2006, 01:43 PM   #2
rignes
Member
 
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Original Poster
Rep: Reputation: 30
If no one knows the exact answer, that's OK. However, if anyone has a suggestion on what I could try that may lead to more info that would be a good place to start.

Thanks,

Brian
 
Old 08-06-2006, 02:09 PM   #3
theoffset
Member
 
Registered: Aug 2005
Location: Guadalajara, Jal, Mexico
Distribution: Slackware Linux
Posts: 211

Rep: Reputation: 31
Just did a quick test of your commands with a 30 second sample, and everything seems to be working here (running -current too): The downsampled file was succesfuly created and no SoX procces was left running.

Maybe you've hit on a SoX or lib{vorbis,ogg} bug.

My suggestion would be:
Try using oggdec instead of SoX.

EDIT: Now, if you want to try and see what's wrong, you could strace SoX and see if you find any weird behavior (like an endless loop, or SoX waiting for a signal/event).

Last edited by theoffset; 08-06-2006 at 02:14 PM.
 
Old 08-06-2006, 06:43 PM   #4
rignes
Member
 
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Original Poster
Rep: Reputation: 30
Hey, now that's a good idea. I don't know why I didn't think of it! I change it to use oggdec instead and it seems to be working fine now.

Thanks for the suggestion!

Brian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
noise with sox bernd54321 Linux - General 1 04-21-2006 03:33 PM
SoX karunesh General 1 08-09-2005 01:07 PM
Cannot install Sox! Sebastian Naitsabes Linux - Software 7 07-14-2005 12:31 PM
The Sox Parade H2O-linux General 4 11-01-2004 08:48 PM
WARN: sox Joey.Dale Linux - Security 1 08-11-2004 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration