[gccsdk] Left-right interleave in /dev/dsp versus DigitalRenderer

Ron beeb at woosh.co.nz
Fri Apr 20 14:53:03 PDT 2012

In message <ddc5748352.belles at ivy.at.home>
          Christopher Martin <belles at internode.on.net> wrote:

> Hello,
> There has been a mismatch between DigitalRenderer's default setting of
> right-left stereo in accordance with Acorn 16-bit audio format, versus
> left-right stereo used by applications built on libraries such as SDL
> and </dev/dsp>. It means that by default, ported applications play
> left and right channels swapped on RISC OS.
> Rather than applications having to deal with this on an individual
> basis, I'd like to propose that there are two places where a change
> could resolve the mismatch once and for all.
> (1) DigitalRenderer could default to LR order when SWI
> DigitalRenderer_Activate16 is called, instead of assuming that samples
> will be in Acorn-friendly RL order.
> (2) The static function set_defaults in UnixLib's
> <libunixlib/sound/dsp.c> could call SWI DigitalRenderer_SampleFormat
> with R0=3 after calling SWI DigitalRenderer_Activate16.
> I think (2) would be the better solution, but what do others think?

Using (1) would be wrong then when sending a wave file to Renderer: 
from the desktop I imagine.
I have already had confusion with 3.25mm to rca adapter cables with the
white and red ends being made the wrong way round, So any corrections
could actually be a timesaver in some circumstsances.

Ron M.  

More information about the gcc mailing list