How to stop Flash Player from upmixing stereo to 5.1?

3

5

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?

Etienne Dechamps

Posted 2013-03-11T21:30:06.570

Reputation: 1 662

Answers

5

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).

Etienne Dechamps

Posted 2013-03-11T21:30:06.570

Reputation: 1 662

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. – Martin – 2013-05-24T17:04:38.180

@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. – Etienne Dechamps – 2013-07-06T13:08:44.710

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! :) – Arjan – 2014-06-01T18:54:23.453

0

Flash player doesn't seems to be configurable to that level.

From http://forums.adobe.com/message/4294981?tstart=0

In Firefox, the Flash Player is a plugin, and as so, there are limitations
with what you can do with it.
But because it runs as a guest of the host system which is Firefox, you
can configure how it's handled.

You can configure Flash to play in any player, such as the VLC player for
example. Then change the way VLC outputs audio using the
Tools | Preferences menu 

To redirect swf to other application than the Flash plug-in.

From http://www.ehow.com/how_8409438_use-instead-flash-player-firefox.html

    1  Launch Firefox on your computer.
    2  Download the VLC media player from the VideoLAN website. When
       installing check the option in the installer to install the Firefox
       plugin.
    3  Install the Flash Video Replacer plugin in your Firefox browser from
       the mozilla addons website and restart your Firefox browser.
    4  Navigate to a website that uses Flash video and press the "Flash Video
       Replacer" button on the right side of the navigation bar. Click on the
       "Preferences" option and select "VLC" from the drop-down menu for the
       player.


You can also use the drop-down menu labeled "Preferred Method" to change the
option from "Embedded" to "Standalone" to open the video on the Web page in the
VLC player, rather than just using the VLC plugin embedded in Firefox.

vitorc

Posted 2013-03-11T21:30:06.570

Reputation: 1

please do your best explaining here the contents of the links you provided. if the links get broken, so does your whole answer. – Lorenzo Von Matterhorn – 2013-03-12T19:13:00.017

Thanks for the help @Znau. It seems pretty obvious but I never thought of that. – vitorc – 2013-03-12T19:33:59.790

0

There is a better workaround found here. Basicly you need to edit your mms.cfg file and add this line to it:

UseWAVPlayer=1

The mms.cfg file is stored in the following location:

Windows 32bit -> C:\WINDOWS\system32\Macromed\Flash\mms.cfg

Windows 64bit -> C:\Windows\SysWOW64\Macromed\Flash\mms.cfg

Mac: app support/Macromedia/mms.cfg

(for example, /Library/Application Support/Macromedia/mms.cfg)

Just open the file with a text editor and add the line. Make sure you backup the original first.

ANDiTKO

Posted 2013-03-11T21:30:06.570

Reputation: 101