Mono sounds play through left speaker only

RESOLVED FIXED in Firefox 40
(NeedInfo from)

Status

()

defect
--
major
RESOLVED FIXED
5 years ago
5 months ago

People

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

Tracking

({regression})

28 Branch
mozilla40
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

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

Details

Attachments

(1 attachment)

Reporter

Description

5 years ago
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.
Reporter

Comment 1

5 years ago
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.

Comment 2

5 years ago
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

Comment 4

5 years ago
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]
Reporter

Comment 5

5 years ago
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)

Comment 9

5 years ago
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?

Comment 11

5 years ago
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.
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.

Comment 14

5 years ago
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?

Comment 16

5 years ago
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.

Comment 21

5 years ago
This has been driving me insane. Hopefully we can get a fix soon.

Comment 22

5 years ago
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)

Comment 26

5 years ago
(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
Assignee

Comment 27

5 years ago
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.

Comment 28

5 years ago
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.
Assignee

Comment 29

5 years ago
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)
Assignee

Comment 30

5 years ago
oh but definitely don't pull a MS and assign it to only the centre channel, that's just stupid...

Comment 31

4 years ago
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.

Comment 32

4 years ago
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.
Assignee

Comment 33

4 years ago
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...

Comment 34

4 years ago
This doesn't seem to be hardware specific, since it also affects my Turtle Beach card, so maybe it affects any multichannel setup?
Assignee

Comment 35

4 years ago
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...

Comment 36

4 years ago
(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.

Comment 37

4 years ago
me too with asus essence stx and firefox 37, mono in 5.1 = left speaker! 2.0 is ok

Comment 38

4 years ago
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?
Assignee

Comment 39

4 years ago
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...
Assignee

Comment 40

4 years ago
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)
Assignee

Comment 41

4 years ago
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.
Assignee

Comment 49

4 years ago
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?
https://hg.mozilla.org/mozilla-central/rev/d9aa2a4f6d7c
https://hg.mozilla.org/mozilla-central/rev/463f10614634
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
(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 !

Comment 53

4 years ago
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: 4 years ago4 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)
Duplicate of this bug: 1160973

Comment 59

4 years ago
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.

Comment 61

4 years ago
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.

Comment 62

4 years ago
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.

Comment 64

Last year
(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.

Comment 66

Last year
(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.

Comment 67

Last year
(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.

Comment 69

Last year
On firefox 62.0b4 with Facebook Game "Uno" i have sound only in left speaker

Comment 70

5 months ago

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

Comment 72

5 months ago

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.

Comment 76

5 months ago

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

Comment 77

5 months ago

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

Comment 78

5 months ago

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.

You need to log in before you can comment on or make changes to this bug.