Menu

#6957 AUDIO: ARM ASM sound code causes distorted audio on 32 bit armv6

open
nobody
None
5
2015-12-16
2015-11-21
vanfanel
No

AUDIO: ARM ASM sound code causes distorted audio on 32 bit armv6. Most games are affected: every SCUMM game with voices, dreamweb, agos games...
Disabling ASM ARM sound makes sound correct and clear again.
It's supposed to be related to ARM ASM code recently supporting a wider range of input formats: it was woking before these changes.

Discussion

  • digitall

    digitall - 2015-12-16

    Have taken a further look at the ARM ASM code here and it is likely that there are latent issues related to the change from 16:16 to 17:15 in the fractional representation i.e. the ASM will need far more extensive work to be 17:15.

    Since this may result in actually worse performance anyway than just letting the ARM C compiler do it's job, it may be best to disable the ARM ASM in the audio system by default and let this be enabled and fixed for any ports which truely need this.

    @fuzzie , @lordhoto: Thoughts?

     
  • digitall

    digitall - 2015-12-16

    The best way to fix this code would probably be to add code which compiles both of the rate conversions together and compares the output i.e. on ARM, it compiles the C version of the rate convertor and the ASM version, using the C version output, but comparing the ASM output and warning if it doesn't match and what values were passed in... this will allow rework and debugging until the two match. Working on this is left as an exercise for the reader... We are Open Source after all :)

     
  • Johannes Schickel

    I disabled the code now with 3fab9056296fbf491372f66f7fbb23d6312ad2ad. After looking a bit into it with digitall it seems not easy to fix it. If anybody with ARM assembly knowledge wants to look at it, that would be most appreciated.

    I will keep this bug report open to remind people that there are actual issues with this code.

    My personal opinion is: We might just want to drop this code (and thus an additional source of bugs) if there is no (strict) need for speeding up this code path for ARM targets.