How to stop Flash Player from upmixing stereo to 5.1?

13,914

Seeing that Adobe closed the bug as "working as intended" (which is just plain stupid), I decided to fix it myself.

Here's the result: StopBraindeadSurround (open source, WTFPL license)

To install, just copy audioses.dll into your Flash player directory (typically C:\Windows\SysWOW64\Macromed\Flash if you're using 64-bit Windows). You might need to copy it again after Flash Player updates.

Here's an extract from the README:

If you are using Flash Player with a surround sound system (e.g. 5.1, 7.1), you might have noticed that Flash exhibits a strange behavior when playing audio streams: instead of just passing the stereo audio stream untouched like any sane program would do, it upmixes it to 5.1, duplicating the audio streams to the rear speakers and applying its own bass management to the LFE channel.

This is of course insanely stupid for a number of reasons. First of all it is inconsistent with all other software out there (e.g. audio players such as foobar2000). Second, stereo streams are not supposed to be "expanded" when played on a 5.1 stream, as they were never meant to be played back using rear speakers. Third, it results in excessive bass output because acoustic summation typically results in higher sound pressure at the listening position in the lower portion of the spectrum. And finally, if the user really wants upmixing despite all these issues, most audio drivers allow him to do that at the system level anyway, which makes much more sense than doing it at the application level.

This little piece of software (SBS: StopBraindeadSurround) is specifically designed to prevent Flash Player from upmixing audio. Once installed, it prevents Flash Player from opening the audio device with more than 2 channels, thus forcing it to fall back to (hopefully) untouched stereo output.

Those interested in the implementation will find a description of how it works in the source code (sbs.cpp).

Share:
13,914

Related videos on Youtube

Etienne Dechamps
Author by

Etienne Dechamps

Updated on September 18, 2022

Comments

  • Etienne Dechamps
    Etienne Dechamps almost 2 years

    I'm using Flash Player 11.6.602.171 in Firefox 19.0.2 with Windows 7 and a 5.1 sound device.

    I just noticed that when playing stereo sound in Flash (e.g. Youtube, Soundcloud), Flash is upmixing stereo sound to 5.1 by duplicating sound into the rear speakers and doing some kind of home-made bass management with the LFE channel.

    This is obviously completely wrong and is clearly a bug, since stereo is not meant to be reproduced using more than two speakers and Flash is the only software that behaves that way. I don't have this issue with other players (e.g. foobar2000). This is not an isolated issue; indeed, other people seem to have the same problem.

    Is there some way to disable this behavior and force Flash to output the stereo sound untouched?

  • Lorenzo Von Matterhorn
    Lorenzo Von Matterhorn over 11 years
    please do your best explaining here the contents of the links you provided. if the links get broken, so does your whole answer.
  • vitorc
    vitorc over 11 years
    Thanks for the help @Znau. It seems pretty obvious but I never thought of that.
  • Martin
    Martin about 11 years
    Unfortunately doesn't work for me. Flash freezes on load (before anything is displayed), after a while Firefox asks to kill the plugin. I use Windows 8 and Flash 11.7.700.202.
  • Etienne Dechamps
    Etienne Dechamps almost 11 years
    @Martin: yes, it appears that my hack doesn't work on Windows 8. I have no idea why. I tried to debug it with someone else but it didn't get me anywhere, so I'm afraid I won't be able to help you.
  • Arjan
    Arjan about 10 years
    dipp wrote in a (deleted) answer: I've managed to run your code on Windows 8. Problem - AudioSes.dll loaded when MMDevApi.dll calls CAudioEndpoint::Activate, so all magic stuck on some mutex (we calling Activate from Activate). To solve this problem I've just moved hook code into dinput8.dll hook library and moved all magic in DllMain. All works like a charm. Thanks for you initial work! :)