Menu

#211 Soundblaster/CD Audio fix for Big Endian Machines

Unstable_(example)
closed
nobody
None
5
2016-09-04
2008-06-10
Brian Chin
No

In the current CVS version of DOSBox, it appears that the audio data for the soundblaster and the CD audio component is being drawn straight from the DMA buffers in the DOS memory space. This works fine on machines which share the same endianness as DOS (e.g. x86), but causes significant audio corruption on big endian machines (e.g. PPC Macintoshes). This patch adds four AddSample_16D methods to the mixer class (where D here stands for DOS). These methods will swap the byte order of the incoming samples to native order if necessary for the platform (using the WORDS_BIGENDIAN preprocessor symbol as a flag). The changes to AddSample() are minor, simply adding a new template flag nativeorder. I converted four calls to AddSample in sblaster.cpp, which was then tested against Gabriel Knight I CD, which previously had noticable errors. I also converted one call in cdrom_image.cpp, since similar corruption was occuring there as reported by a friend, so it has not been personally tested. I have not tested this code on an x86 box yet.

Discussion

  • Brian Chin

    Brian Chin - 2008-06-10

    A unified patch file for the big endian sound bug

     
  • c2woody

    c2woody - 2009-03-24

    Thanks for working on this, I've used a somewhat different approach using
    bigendian-aware memory access functions.

    If possible please verify that it's working now in the cvs.

    Thank you.

     
  • c2woody

    c2woody - 2009-06-07

    Please verify whether 0.73 is working fine now.

     
  • Sjoerd

    Sjoerd - 2016-09-04
    • status: open --> closed
    • Group: --> Unstable_(example)
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.