Endiness and sideffect fixes for XMMS
Henry Worth
haworth at ncal.verio.com
Sun Aug 27 11:01:56 EST 2000
Attached are bzip2'd diffs for xmms-1.2.2 to fix some endiness
and macro side-effect problems needed on the LinuxPPC platform.
Included:
xmms/input.c and Output/diskwriter/diskwriter.c
Various glib byteswap macros called with an argument having
side-effects (pointer post-increment). The macros expand
the argument multiple times resulting in the pointer
being incremented well beyond the end of the buffer. On x86
these macros expand to asm code that may not have the
problem, and of course won't even be invoked for common
LE .wav and CD data formats. Causes seg faults in
some cases and corrupt visualzation data in others.
Also, a statement in diskwriter makes order of evaluation
assumptions not guaranteed by C.
esd output plugin
Patches from Takashi Oe <toe at unlserve.unl.edu> add
endiness and sign corrections for esd. I changed the byte
swap routines to use the glib macros generally used in
xmms. Sign conversions and 8-bit data haven't had any
real testing as the wav and sndfile input plugins
aren't working well (sndfile plugin/lib exhibits
endiness problems on all formats and the wav plugin
doesn't recognize many 8-bit wavs on either PPC or
x86 -- an input plugin using the mature multi-platform
audiofile lib would sure be useful, for testing if
nothing else).
Notes for LinuxPPC users:
Dependencies on xmms1.2.2 will require updating the
Gnome related libs to the 1.2.2+ level. On LinuxPPC
these have been very unstable, but 1.2.8 (Helix)
seems to finally be pretty stable (xmms CPU load
is also cut significantly and the memory leaks appear
to be tamed -- 1.2.7 was really bad). These patches
could probably be adapted without too much effort to
earlier versions of xmms if you want to minimize updates.
These dependencies will also drag in the later esound
packages which don't work well with the dmasound drivers
(playing only 1-in-n blocks for a very fast playback --
even with esdplay). The backport of Ian Sandoe's new
dmasound drivers seems to fix, or more likely cover-up,
the problem (see his call for testers on the linuxppc-dev
list). The alternative is to use OSS output (won't work
currently on Pismo with LE data -- e.g. CD's and .wav's)
or try forcing the use of the older (pre-ALSA?) esd.
With these patches -- and if you can get a stable
combination of Gnome libs, esound, and dmasound...
-- the xmms-cdread input plugin
<ftp://mud.stack.nl/pub/OuterSpace/willem/> will work
reliably instead of seg-faulting in xmms/input.c and
the LE CD data will be converted to NE for esd. This
provides a CDDA GUI player for the newer Mac models
that lack analog connections to the CD/DVD (the
alternative is command-line use of cdparanoia with
the -Z option piped into play).
Henry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmms.diff2.bz2
Type: application/octet-stream
Size: 1787 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20000826/c08db14d/attachment.obj>
More information about the Linuxppc-dev
mailing list