On 5/11/07, Chris Bagwell <[EMAIL PROTECTED]> wrote:
> Everything seems to work fine, but "play" don't work. Also
> play infile -x -t ossdsp /dev/dsp
> plays only noise.
>
> But this is a good thing to starting point from here on I can dig into the
> source.
>
Can you clarify this part again? You mention once that -x plays
fine but next you say that -x plays noise.
Probably the fix needs to go somewhere in ossdsp.c. I notice in
really old version of code that we would force byte swapping
and that has been removed.
Look around line 121. That used to look closer to:
/* determine which 16-bit format to use */
if (samplesize == 16 && (tmp & sampletype) == 0)
{
sampletype = (SOX_IS_BIGENDIAN) ? AFMT_S16_LE : AFMT_S16_BE;
ft->swap = ft->swap ? 0 : 1
}
The name for swap has changed... Not sure how to change that off
hande but should be simple enough.
The logic before this code attempts to use machine endian for
audio device. This piece of code detects that audio device
does not use same endian as machine format and so tells
sox to internally swap before writing.
I'm happy to see that we're going somewhere!
Big-endian Vs. little-endian... Didn't i just see a change related to
that? Unfortunatly, i've deleted the "cvs commit digest".
-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
LACIME: École de technologie supérieure (http://lacime.etsmtl.ca)