audiorouterdev / audio-router

Routes audio from programs to different audio devices.
GNU General Public License v3.0
3.51k stars 420 forks source link

Not routing/duplicating firefox anymore. #60

Open Ignoracjus opened 6 years ago

Ignoracjus commented 6 years ago

For some reason route/duplicate firefox browser is not working anymore for me. Windows 10 64-bit, everything was working earlier.

WolfganP commented 6 years ago

If you're using FF in multi-process mode, you need to route the background process for proper audio handling (check the moving audio vumeter in audiorouter to identify the right process).

Ignoracjus commented 6 years ago

@WolfganP That's what I'm doing, but it just doesn't route the process

Kirbay commented 6 years ago

Suddenly stopped working on Firefox for me as well. Also on Win10 64-bit.

Edit: Still working for Chrome. Also tried moving it into /LocalLow, but didn't fix it. Soft routing doesn't work with Firefox at all anymore, and duplicate successfully changes the output, but keeps sending it to my PC speakers instead of the device I target.

GenericGoose commented 6 years ago

Can't say it doesn't work 'anymore', because i've only discovered this program today, but can confirm it doesn't seem to be working with firefox

Kirbay commented 6 years ago

Reinstalling Firefox seems to have solved the issue...

kkollman commented 6 years ago

It doesn't route Chrome as well, tried both. It still does route other apps (Spotify though), so you can change the default device and redirect other-than-browser apps.

sf159753 commented 6 years ago

I had the same problem, I can confirm that a clean reinstall of Firefox solved the issue. I used this method (mozilla support question 1057084), it only takes 3 minutes.

henriquedesousa commented 6 years ago

I've reinstalled Tor (which uses a firefox.exe process) but it still doesn't work.

nezroy commented 6 years ago

After some extensive mucking about, I was able to find at least one procedure that works to allow hard routing of FireFox (I have not tested duplicating or soft routing). This applies to its native content processes, though it can be made to work with the Flash plugin-container too.

First, place the Audio Router download inside the Firefox install directory (e.g. C:\Program Files\Mozilla Firefox\AudioRouter-0.10.2). Newer versions of Firefox seem to be very picky about the location of DLLs it allows for injection. If you are getting an 0x00000005 access denied error on routing, this should address that problem.

Next, launch Audio Router first, then Firefox. Ideally you want Firefox to be showing a blank new tab with no content loaded. Further, I have only tried this with hardware acceleration disabled and the content process limit set to 1 (under the Options -> Performance settings in Firefox).

In Audio Router you should now see 3 Firefox processes under the default audio device. Route all 3 to your desired target device. Note that two processes (those showing as only "firefox.exe") will hang with "Routing Pending".

In Firefox, navigate to a media-enabled page (e.g. YouTube). One of the pending firefox.exe processes should automatically complete as soon as the media starts, and it will swap to the targeted device in Audio Router where the routing should be complete/working.

The same basic process works with the Flash plugin container, but more annoyingly. You have to get the Flash plugin loaded, which will display as "plugin-container.exe" in Audio Router, but nothing loaded/playing/running in that Flash plugin yet. You'll want to route the container before loading any media, which will put it in the "routing pending" state, and then start the media which should finalize the process properly. For some sites this is easy as they load the Flash plugin but don't start or load anything until you click something. But for other sites you may need to intercept their content auto-loading JS to accomplish this.

More annoyingly, you will have to re-route the plugin-container.exe every time you change contexts. Refreshing a page, switching to a new page, etc. will all kill and restart the Flash plugin-container.exe.

BobVul commented 6 years ago

This is due to the recently-implemented content process sandboxing. Looks like it only affects the highest level of sandboxing at the moment (3). You can go to about:config and turn security.sandbox.content.level down to 2, but that will of course reduce security slightly (and therefore make you a bit more vulnerable to malicious websites).

WolfganP commented 6 years ago

Just to leave it here as a reference, it seems Mozilla was also working on the audio code recently: http://techdows.com/2018/01/firefox-audio-playback-issue-in-windows-10-fixed.html

Mozilla Fixes Firefox Audio Playback Issue in Windows 10 build 17063

Last Updated: January 1, 2018 By Venkat in Firefox, News No Comments Tags: mozilla, Windows 10  

Firefox 57 Quantum and Nightly have an audio playback issue in Windows 10 insider build 17063, which has been fixed by Mozilla with help from Microsoft.

Microsoft has recently released Windows 10 build 17063 to insiders in the fast ring with Timeline and Sets features. The build has broke audio in Firefox browser, which was confirmed by Microsoft and acknowledged this was due to the change they made to the Audio Volume APIs.

Windows has several audio volume APIs – IAudioEndpointVolume, IChannelAudioVolume, ISimpleAudioVolume, and IAudioEndpointVolume. These APIs can be used to change the volume and/or mute state of the stream, app, or audio device.

    In build 17063 a change was made to these APIs to have them return S_FALSE (1) if the requested change was a no-op.

    This broke apps (like Firefox) which request changes (that may be no-ops) and then explicitly check the return value against S_OK (0).

Audio/Sound not playing in Firefox in Windows 10

In this Windows 10 build, when users found audio/sound not working in Firefox, they’ve reported the issue on Feedback Hub.

Microsoft Windows audio and Quality employee informed about the change in latest insider build to reported user on Reddit and provided a workaround, which Mozilla has turned into a patch to fix the issue.

As for now, the issue seems to have been fixed in the Nightly, Firefox 57, Firefox 58 beta and Firefox 52 ESR versions.

The ‘bug 1426719– Latest insider build of Windows 10 (17063) breaks sound playback completely’ has the complete information available.
BobVul commented 6 years ago

Looks to be related: https://support.mozilla.org/en-US/kb/i-cant-play-audio-remote-desktop-connection

geekgirl101 commented 5 years ago

I'm noticing it's not rerouting Firefox v63 either despite doing everything mentioned above. Another thing I've noticed lately is if I close down and restart Chrome it doesn't keep my settings, it goes back to default. This is very frustrating. Is there an alternative program that can do what Audio Router does without it losing settings/requiring premium?

BobVul commented 5 years ago

If you're on Windows 10 v1803 or newer, you can now do this naively via Settings. I personally like EarTrumpet, a volume panel replacement that lets you configure the v1803 output device selection via drag-n-drop.

geekgirl101 commented 5 years ago

I only want it with the browsers though not with all sound settings. I'll try EarTrumpet and see if that works.

BobVul commented 5 years ago

What 1803 added was per-app output device selection, the same thing audiorouter does. The default UI is just a bit tedious to use.

EarTrumpet only hooks into this mechanism. You don't need it to use the new native feature.

I don't know if they persist across restarts.

geekgirl101 commented 5 years ago

Oh thank you, EarTrumpet is doing exactly what I wanted it to do.

L2L2L commented 5 years ago

i like to route different tabs of sound to different output and input with virtual cable. Has this been fix? Is there a step I can take to fix this?