[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: patch for arts on ppc
From:       Martin Vogt <mvogt () rhrk ! uni-kl ! de>
Date:       2000-10-07 14:27:16
[Download RAW message or body]


Hi,

>Yep this works. !
>
>I have working ppc and intel machines which both work, someone wants to comment
>on this?
>
>I want to commit this :)

This patch (may) break the AIX port, but artsd has no AIX audiooutput
so this should be not really a problem.

What we can see from the patch is:
The mp3 decoder (splay) puts the pcm data out in big endian,
but we need to swap it, because the audiosubsys.cc configures
/dev/dsp as little endian.

line 253: kdelibs/arts/flow/audiosubsys.cc

int format = AFMT_S16_LE;  
if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &format)==-1)

What is correct depends on the "things" which happens after
the mp3 decode and before we send it to /dev/dsp.
Im mean: the mixing and the int->float->int conversion.
I really think, that the int->float->int conversion goes
wrong, because it depends on that the int values are in big endian
(but with this patch its in little endian.)

I think that the outout of the mp3 decoder is ok
when it is big endian and that the patch (although it works)
is at the "wrong place"
 

I think that we need to add behind line 253 in audiosubsys.cc:

#ifdef WORDS_BIGENDIAN
format=AFMT_S16_BE
#endif
                ^ "B" instead of "L"

and thus dont need the patch in mpeglib.
So before we apply a patch in the mp3 decoder we should do:

1) test mixing of mp3 streams (start a few instances of mpeglibartsplay
   with an mp3)
2) test playing of wav files with mpeglibartsplay (tplay)
3) test playing of wav files with artsplay (audiofile)
4) test the software volume in kaiman/artscontrol.

We should find out which patch breaks less applications, I dont
think that arts make the assumption that all audio data
is in little endian, but in the "host byte order" maybe
I`m wrong here.

regards,

Martin

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic