On Fri, May 11, 2007 at 04:41:44PM +0200, Wolfgang Aigner wrote:
> Hello, Chris,
> thanks for your answer.
> 
> > sox infile -t ossdsp /dev/dsp
> 
> this works, fine.
> 
> > if that plays noise then there may be an endian problem.  Try changing
> > endians with:
> >
> > sox infile -x -t ossdsp /dev/dsp
> 
> this works also fine.
> 
> 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.

Chris


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to