From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <39A85A74.54F05060@ncal.verio.com> Date: Sat, 26 Aug 2000 17:01:56 -0700 From: Henry Worth MIME-Version: 1.0 To: "linuxppc-dev@lists.linuxppc.org" Subject: Endiness and sideffect fixes for XMMS Content-Type: multipart/mixed; boundary="------------80CA3E0007A23B933755109A" Sender: owner-linuxppc-dev@lists.linuxppc.org List-Id: This is a multi-part message in MIME format. --------------80CA3E0007A23B933755109A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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 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 --------------80CA3E0007A23B933755109A Content-Type: application/octet-stream; name="xmms.diff2.bz2" Content-Disposition: attachment; filename="xmms.diff2.bz2" Content-Transfer-Encoding: base64 QlpoOTFBWSZTWRnaAtsAC5LfgGI6eX///ze33ou/7//uYAlcfSqfeXUMuVF26y5YhQAAZGxw 00wQyGmmRkwgGmgDCaNMmABA0EpqKn6aU8FPU9RkGmmgADQAAAAAAcNNMEMhppkZMIBpoAwm jTJgAQNBCkkKeqZqfqnonqNqGgAAYgyDQADQPUAikRpPSp6np6JpHqH6o9QD1HpMgNAAADQ0 AKikIAmiekyMlNkyZJppsUAyYjQAeiepp6nPyqqqZ3KAcSQQYUWAklJVgYUhJYCiIG+kcyVC JpSqAhhZSBhkoCQmVat+0dQ+MfBKrbgedRRnhhkxhbb/uGGjDKtAQ7HDHpzbRwGI4GG/CXBw nRWYBu01mtZOwYGxiG6qqqquQYGYxNmXSN87t91XXsz17LqubNZjIwr9sZvzLf8Wg67sDVVP A36gwMDbrdi3GGbpctXIYO6UdgoURZDFWiqCGUbszoDQuJEEFJEszBmGLEkiSwUJVRL0KgkO g/KaBja5D7Gd0KfEjjAZyB3z852P6W/O7bTZsOCzbG586pNS0AHRGaAa8opr9F+xtsJIQxGB u9MF69VU955Wh75wPM3SGFWowjO9yoGBzlnO9AGt5LgGcfjCzWfUGBgG06VCm4OneYho6y/G GZjUIKhdzWNEM2kdOY9+TZzhSqWpSkBAQwN8lAyQuOChPq3Fos924m2BtOImqxnPg1smI8+N nq9bVcD0hKmRqn0jBrMBhryc9mtMhV0Vx8hyisNUYrObPHbbtztt0c/BFw2n2SYTB+aJ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