Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 2010 17:08:25 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Gary Kline <kline@thought.org>
Cc:        Glen Barber <glen.j.barber@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: any port use /dev/dsp directly?
Message-ID:  <20100114230825.GD5651@dan.emsphone.com>
In-Reply-To: <20100114223105.GA84284@thought.org>
References:  <20100114012059.GA3921@thought.org> <20100114013746.GB67999@orion.hsd1.pa.comcast.net> <20100114024242.GA9744@thought.org> <20100114165717.GA5651@dan.emsphone.com> <20100114201616.GA73961@thought.org> <20100114211947.GB5651@dan.emsphone.com> <20100114223105.GA84284@thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jan 14), Gary Kline said:
> On Thu, Jan 14, 2010 at 03:19:47PM -0600, Dan Nelson wrote:
> > The sox port comes with its own "play" command that can parse many
> > containers and encodings, including wav files.
> 
> I did see that.  I'm wondering of theses is some sox translation that
> would do say
> 
> %sox -w WAV -r [rawoutfile]

Certainly; file conversion is one of the basic purposes of sox.  Something
like:

  sox myfile.wav -b 16 -e signed -r 22050 -c 2 myfile.raw

will convert the wav file (whatever its format is) to a signed 16-bit stereo
raw file.  For raw files, you can also use special file extensions that
specify the encoding ("myfile.s16" for example, for a signed 16-bit file). 
Adding "-V3" to the beginning of the command will print the full input and
output specs, plus the filter chain required to do the conversion (if any). 
The sox and soxformat manpages are pretty comprehensive.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100114230825.GD5651>