Closed Bug 979705 Opened 11 years ago Closed 9 years ago

Mono sounds play through left speaker only

Categories

(Core :: Audio/Video, defect)

28 Branch
x86_64
Windows 7
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox28 --- wontfix
firefox29 --- wontfix
firefox30 --- wontfix
firefox31 --- wontfix
firefox32 --- wontfix
firefox33 --- wontfix
firefox34 --- wontfix
firefox35 --- wontfix
firefox36 --- wontfix
firefox37 --- wontfix
firefox38 --- wontfix
firefox39 --- wontfix
firefox40 --- fixed

People

(Reporter: vtqobex, Assigned: Paul.Hancock.17041993)

References

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20140303165517

Steps to reproduce:

Open https://vine.co/v/MA7WgDqvqUD/embed. Click the button to unmute audio.


Actual results:

Audio plays through left speaker only.


Expected results:

Audio should play through all front speakers or at least left and right.
See 970147, especially comments 40 through 43. Like that issue, this may be specific to Creative sound cards, but I don't know for sure.
if anything, mono should only play out of the center speaker on a 5.1 set, or the front and left on stereo or quadraphonic.
(In reply to vtqobex from comment #1)
> See 970147, especially comments 40 through 43. Like that issue, this may be
> specific to Creative sound cards, but I don't know for sure.

I think it is, because I can't repro with an other sound card. I'll try to get to this shortly.
Assignee: nobody → paul
I was unable to reproduce this problem with Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0

[bugday-20140310]
Is a fix likely to make it in time for 28 GA?
Component: Untriaged → Video/Audio
Product: Firefox → Core
(In reply to vtqobex from comment #5)
> Is a fix likely to make it in time for 28 GA?

No.
If this still needs to be confirmed, Ioana does someone on your team have the appropriate hardware to test and confirm the bug? Or can we just mark it new since people are assigning the bug and marking various releases as affected?
Flags: needinfo?(ioana.budnar)
Sorry, I forgot to set the status.

I'm the person that'll fix the bug and I have the appropriate hardware (which is specific to this bug). I just got side tracked by some other stuff, but this bug should be easy enough, I'll get to it this week hopefully.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(ioana.budnar)
Hi all,


Also having this problem with mono sounds in Firefox 29, but I do not have a Creative Labs sound card. I'm using an Asus Xonar D2X, set up in Windows 7 64bit as 5.1 channel sound.

I created a test MP3 in Audacity and exported it as both stereo and mono. The stereo sound plays through the front-left and front-right speakers, but the mono file plays only through the front-left speaker.

For comparison, Chrome 35.0.1916.86 beta-m plays both stereo and mono through both front speakers.
Thanks Andy, would you mind checking if the latest Aurora and Nightly builds repro this bug in your configuration? 

Paul, have you made any progress on this?
Hi Anthony - I've tested in Aurora and Nightly (05/01) and can confirm behaviour is the same - mono sound is coming from front-left only.
Thanks Andy.
I'll try to look into this as soon as I can, but I'm pretty busy. Thanks for the new reports, I'll keep everyone posted.
I'm having this issue with my Logitech G930 Headset on Firefox 29.  Seems to apply to mono sounds only.  Youtube works fine.  Any word on when a fix could come?
We're past the point where any fixes could land for Firefox 29 and given Firefox 30 releases this week a fix is unlikely. Paul, any update on a fix for 31?
I have still this same bug on Firefox 34, I have Creative sound card but audio plays in both channels if I watch at IE.
Paul, any update on the development status of this bug?
No, I don't have time for now.
Flags: needinfo?(paul)
(In reply to Paul Adenot (:padenot) from comment #18)
> No, I don't have time for now.

Should this go back into unassigned then?
Maybe, although I'll probably end up fixing it myself anyways :-). Not a lot of people know this code.
This has been driving me insane. Hopefully we can get a fix soon.
Would love to see a fix for this, particularly since YouTube now enforces HTML5 videos for Firefox 33 and newer. Many videos are mono, and there seems to be no "legitimate" way of enabling Flash videos on YouTube. You need to resort to spoofing the user agent, or use an addon specifically to force Flash.

Using Nightly 36, with a Sound Blaster ZxR.
Unfortunately I don't think we are any closer to a fix for this. 

Paul, what can be done to move this bug forward? Do you need more debugging of the issue? Is it just a matter of finding someone to work on this? If so, and assuming that person isn't you, is there something we can do to put this into a "volunteer" bucket?
(In reply to Anthony Hughes, QA Mentor (:ashughes) from comment #23)
> Unfortunately I don't think we are any closer to a fix for this. 
> 
> Paul, what can be done to move this bug forward? Do you need more debugging
> of the issue? Is it just a matter of finding someone to work on this? If so,
> and assuming that person isn't you, is there something we can do to put this
> into a "volunteer" bucket?

Hi Paul, Just doing a needinfo to get this on your radar. Building on Anthony's questions (above), I think you have the bandwidth to look at this now.  What other work would get delayed if you looked at this now?
Flags: needinfo?(padenot)
This need specific hardware. I might have what's needed, but it's on an old machine at home. I'll check tomorrow.
Flags: needinfo?(padenot)
(In reply to Nick from comment #22)
> Would love to see a fix for this, particularly since YouTube now enforces
> HTML5 videos for Firefox 33 and newer. Many videos are mono, and there seems
> to be no "legitimate" way of enabling Flash videos on YouTube. You need to
> resort to spoofing the user agent, or use an addon specifically to force
> Flash.
> 
> Using Nightly 36, with a Sound Blaster ZxR.

I also have a Sound Blaster ZxR, using firefox 33.
when using the Headphone jack with the headphones configuration it only plays through the left speaker but when using the RCA front left and right jacks with the stereo configuration it actually plays through both speakers
FF 33.1.1 and prior, confirmed on at least a SB Zx on w8.1px64, on 5.1 channel mode mono audio is incorrectly mapped to channel 0, the left speaker only, where it should be mapped to both 0 and 1 and/or optionally 2, which in a lot of formats is the center, however playback through center-only is not entirely ideal.

In my case my center is a mid-only set of drivers behind the screen, which of course means no high frequencies come through it, fronthouse L and R are HiFi drivers.

also take note the problem is persistant when in headphone mode due to surround emulation abstraction, ie it takes in the 5.1 channels and cross-mixes to the headphone L and R.
Anything?

After almost a year of suffering this issue, I'd rather know sooner than later whether this is going to get fixed at all, so I could already start migrating to another browser if needed.
I don't understand why this isn't fixed by now, not only is it a major bug but a relatively simple one to fix in code, it only needs a channel check and assignment (example pseudo; if sourceChannels == 1 then assign L and R to 0).
Flags: needinfo?(padenot)
oh but definitely don't pull a MS and assign it to only the centre channel, that's just stupid...
Starting with Firefox 36 YouTube will default to HTML5 videos instead of using the Flash player: http://youtube-eng.blogspot.de/2015/01/youtube-now-defaults-to-html5_27.html

With this change a much wider audience will be exposed to this bug and this could be bad for Firefox' reputation.
personally disabling webm and any html5 video playback capbility in the browser, it still happens to be a memory hog which is just not afforded whilst firefox remains predominantly single process.
Firefox potentially needs more developers behind it, almost a year to fix one major bug, let alone the rest, is just going to continue to stifle it more than ever...
This doesn't seem to be hardware specific, since it also affects my Turtle Beach card, so maybe it affects any multichannel setup?
Yea, I'm very sure it only occurs on non-stereo channel setups, including your various '3D headphones' etc that use 5.1 channels in windows and specially mix it in the headphones or a USB card/stick.

For the most part it seems like its just a channel mapping issue, but the assignee seems MIA and I haven't yet looked at the code in question...
(In reply to Paul17041993 from comment #35)
> Yea, I'm very sure it only occurs on non-stereo channel setups, including
> your various '3D headphones' etc that use 5.1 channels in windows and
> specially mix it in the headphones or a USB card/stick.
> 
> For the most part it seems like its just a channel mapping issue, but the
> assignee seems MIA and I haven't yet looked at the code in question...

I have a Creative Sound Blaster X-Fi Titanium PCI-Express with 5.1 speakers and I can confirm that this issue is only present in that configuration. As soon as I change my speaker setup to stereo speakers (in Control Panel --> Sound) I get mono audio through all front speakers.
me too with asus essence stx and firefox 37, mono in 5.1 = left speaker! 2.0 is ok
Still nothing. Multichannel has been broken for over a year.

Looks like Firefox also doesnt play the LFE channel: https://bugzilla.mozilla.org/show_bug.cgi?id=1115967

How many years should we wait until someone looks at the broken multichannel audio?
I seriously don't know why I (or anyone else for that matter) keep forgetting to get this fixed, though I've been using a SB Z (in 5.1) and almost all youtube vids have been stereo, only the mono youtube vids seem to expose the problem/s...
I'm currently working on this bug, more specifically removing the legacy stereo mixer and replacing it with a full crossmixer (any no. channels in to any no. channels out).
Flags: needinfo?(padenot)
fix attached
Attachment #8594242 - Flags: review?(padenot)
Thanks, I'll have a loot soon.
Assignee: padenot → Paul.Hancock.17041993
Comment on attachment 8594242 [details] [diff] [review]
betterupmix.patch

Review of attachment 8594242 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, look good!

I'll fix those style issues myself and push the patch for you (in your name).

::: media/libcubeb/src/cubeb_wasapi.cpp
@@ +405,5 @@
> +template<typename T>
> +void
> +upmix(T * in, long inframes, T * out, int32_t in_channels, int32_t out_channels)
> +{
> +  XASSERT(out_channels >= in_channels && in_channels > 0);

The second part is always true because of checks downstream.

@@ +406,5 @@
> +void
> +upmix(T * in, long inframes, T * out, int32_t in_channels, int32_t out_channels)
> +{
> +  XASSERT(out_channels >= in_channels && in_channels > 0);
> +  

nit: trailing spaces.

@@ +409,5 @@
> +  XASSERT(out_channels >= in_channels && in_channels > 0);
> +  
> +  /* either way, if we have 2 or more channels, the first two are L and R*/
> +  /* If we are playing a mono stream over stereo speakers, copy the data over. */
> +  if (in_channels == 1 && out_channels >= 2)

We mandate { and } even for single line statements, on while/if/for, here and below.

@@ +418,5 @@
> +    for (int j = 0; j < in_channels; ++j) {
> +      out[o + j] = in[i + j];
> +    }
> +  }
> +  

nit: trailing spaces.

@@ +422,5 @@
> +  
> +  /* check if more channels */
> +  if (out_channels <= 2)
> +    return;
> +  

nit: trailing spaces.
Attachment #8594242 - Flags: review?(padenot) → review+
gtest crashes on Linux as well.
https://treeherder.mozilla.org/logviewer.html#?job_id=9062301&repo=mozilla-inbound

Please verify green on Try before re-pushing.
yea, found out the line endings were dodgy after doing more code work, VS120 has been very buggy lately, including a couple crashes and having to wipe registry data...

formatting noted, whitespaces would've been due to the bad line endings I hadn't noticed, but will remember to check for that in subsequent patches.

I'd assume the gtest crash for linux would also be due to the line endings?
(In reply to Paul17041993 from comment #49)
> yea, found out the line endings were dodgy after doing more code work, VS120
> has been very buggy lately, including a couple crashes and having to wipe
> registry data...
> 
> formatting noted, whitespaces would've been due to the bad line endings I
> hadn't noticed, but will remember to check for that in subsequent patches.

That's not problem really, I just had to load it up in my editor and tell it to reformat the code.

> I'd assume the gtest crash for linux would also be due to the line endings?

It was a rarely triggered deadlock from a patch pushed some time before I pushed your patch, and just happened to occur the first time on the push for your patch, but I was chatting with the sherrif while it happened, it was pretty clear it was not your patch: it's not even compiled on Linux.

Again, thanks, and looking forward to your next contribution !
i would like to see this get uplifted to 38, either for beta 7 or RC.

The code looks good, and the benefits to users that watch video's with mono sound or lfe missing would be readily apparent.
(In reply to Pulsebot from comment #51)
> Backout:
> https://hg.mozilla.org/mozilla-central/rev/34c74293536d

So reopening...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Flags: needinfo?(padenot)
Flags: needinfo?(Paul.Hancock.17041993)
Yeah no this poor Pulsebot got confused, it's in there.

https://dxr.mozilla.org/mozilla-central/source/media/libcubeb/src/cubeb_wasapi.cpp?from=cubeb_wasapi.cpp#390
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Flags: needinfo?(padenot)
Flags: needinfo?(Paul.Hancock.17041993)
Resolution: --- → FIXED
Will be want this patch to be uplifted to Aurora and Beta or it's too much risk?
Flags: needinfo?(padenot)
(In reply to Virtual_ManPL [:Virtual] from comment #56)
> Will be want this patch to be uplifted to Aurora and Beta or it's too much
> risk?

Should be alright, maybe just aurora though.
Flags: needinfo?(padenot)
Um? what?

Tell me this is a mistake?
yeah not sure what :virtual is doing here, but this is definitely not wontfix, the patch is riding the trains smoothly.
38 is release and 39 is beta, neither of which will get the patch. It's in 40 right now and it won't be backported, so it's right to tag those as wontfix.
39 was aurora when the patch landed, how the heck did it miss out?
Issue started appearing in my Firefox for certain sites. Periscope, for instance, is only playing audio on the left channel. Confirmed to be working in full audio in Chrome. Tumblr also presents the same issue. Youtube seems to work fine.

Firefox 60.0.1 (64-bit), Win7.
(In reply to billbergquist4 from comment #63)
> Issue started appearing in my Firefox for certain sites. Periscope, for
> instance, is only playing audio on the left channel. Confirmed to be working
> in full audio in Chrome. Tumblr also presents the same issue. Youtube seems
> to work fine.
> 
> Firefox 60.0.1 (64-bit), Win7.

It seems to only occur to mono audio, but yes I can confirm this bug

Firefox 60.0.1 (64-bit), Win8.1 using a USB Headset (Plantronic GameCom 788)
Can you please try Firefox 61 (beta)? The multichannel handling was reworked in bug 1432779 and bug 1432779.
(In reply to Matthew Gregan [:kinetik] from comment #65)
> Can you please try Firefox 61 (beta)? The multichannel handling was reworked
> in bug 1432779 and bug 1432779.

Hello there,
I've updated to FF 61 and that fixed the bug for me.

Thanks.
(In reply to Matthew Gregan [:kinetik] from comment #65)
> Can you please try Firefox 61 (beta)? The multichannel handling was reworked
> in bug 1432779 and bug 1432779.

you posted the same bug twice.
(In reply to Danial Horton from comment #67)
> (In reply to Matthew Gregan [:kinetik] from comment #65)
> > Can you please try Firefox 61 (beta)? The multichannel handling was reworked
> > in bug 1432779 and bug 1432779.
> 
> you posted the same bug twice.

Bug 1431221 was the other one, but the important one is bug 1432779.

It looks like the correct bug for the regressed mono playback mentioned in comments 63 and 64 is bug 1461131, which exists in only in 60 and was fixed by the mentioned bugs in 61.
On firefox 62.0b4 with Facebook Game "Uno" i have sound only in left speaker

This bug is still present on Firefox 64.02 for Windows 10.
I am using a headset with 7.1 sound enable (a logitech g933).
When playing a mono-recorded sound via Firefox 64.02, I only hear audio in left channel. On same system, loading the same page in IE 11, Edge, Chrome correctly plays the mono file to stereo.

Hi phamster, thank you for the report, have you tried the workaround described in the following comment: https://bugzilla.mozilla.org/show_bug.cgi?id=1461131#c17

Yes, I have forced stereo enabled in the about:config, restarted the browser, but the affected webpage still plays the mono file in left channel only when playing back on a surround setup.

Since media.forcestereo.enabled pref is set to true and we are getting mono sound in one channel (left) is it bug in our side?

Flags: needinfo?(jyavenard)

I am testing the sample [1] on Linux. I am using a 7.1 device configured on 7.1 layout. When media.forcestereo.enabled = false I have no output. When media.forcestereo.enabled = true I have output on left channel, only.

[1] https://www.audiocheck.net/audiotests_frequencychecklow.php

See Also: → 1508563

phamster, can you post a link to a sample that you are using to reproduce it. Playback can happen from different code paths, and a sample will very that we are looking at the same case.

Hi Alex, you can visit this link and listen to the narration. I know it is recorded as mono, as I did the mixing of the audio.
https://360.articulate.com/review/content/1553b6d0-80cc-40be-be20-13e000fd9615/review

(In reply to phamster from comment #76)

Hi Alex, you can visit this link and listen to the narration. I know it is recorded as mono, as I did the mixing of the audio.
https://360.articulate.com/review/content/1553b6d0-80cc-40be-be20-13e000fd9615/review(In reply to Alex Chronopoulos [:achronop] from comment #75)

And just to reaffirm: plays fine on stereo outputs, but defaults to left mono on a 7.1 sound setup.

I can confirm that on USB audio (5.1) the above plays in left mono, but selecting laptop audio (2.0) as output plays in stereo. Something in FF 60 definitely broke the fix.

I have the "left channel only" issue too on Firefox 68.10.0esr Linux, where I have a 5.1 soundcard setup using Pulseaudio. I started to notice it on some Youtube videos, but it got really annoying during an IBM WebEx call more than 2 hours long.

Shouldn't this bug be reopened?

(In reply to 414n from comment #79)

I have the "left channel only" issue too on Firefox 68.10.0esr Linux, where I have a 5.1 soundcard setup using Pulseaudio. I started to notice it on some Youtube videos, but it got really annoying during an IBM WebEx call more than 2 hours long.

Shouldn't this bug be reopened?

A different issue causing this was fixed in bug 1582442 (Firefox 73). If you're able to upgrade from 68esr, please try a newer version and let us know if there's still an issue.

Sorry to be late, I can confirm that upgrading from 68ESR to 78.0+ solved the issue.

Flags: needinfo?(jyavenard)

I'm experiencing this issue in Firefox 86.0, when playing mono audio. This audio test site, linked in other similar issues, plays the "center" sample from my left speaker. https://www.audiocheck.net/audiotests_stereo.php
I'm running Windows 10 20H2, and have a Focusrite Scarlett Solo USB audio interface.

I've tested with a handful of media files, and it seems that any mono mp3 plays out of my left ear only.
Mono audio also seems to crackle, perhaps that's related?

(In reply to Ari Lotter from comment #82)

I'm experiencing this issue in Firefox 86.0, when playing mono audio. This audio test site, linked in other similar issues, plays the "center" sample from my left speaker. https://www.audiocheck.net/audiotests_stereo.php
I'm running Windows 10 20H2, and have a Focusrite Scarlett Solo USB audio interface.

I've tested with a handful of media files, and it seems that any mono mp3 plays out of my left ear only.
Mono audio also seems to crackle, perhaps that's related?

Just to clarify, please - are you testing with the media.forcestereo.enabled pref set to true or false?

Flags: needinfo?(arilotter)

(In reply to Matthew Gregan [:kinetik] from comment #83)

Just to clarify, please - are you testing with the media.forcestereo.enabled pref set to true or false?

I was testing with media.forcestereo.enabled set to false.
However, I updated my copy of Windows 10 yesterday, and haven't been able to reproduce the issue since - mono audio is now correctly playing through both ears :/

Flags: needinfo?(arilotter)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: