No sound in Unity/Unreal games

VERIFIED FIXED in Firefox 34

Status

()

defect
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: pauly, Assigned: padenot)

Tracking

(Blocks 1 bug, {regression})

unspecified
mozilla34
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox34 verified)

Details

Attachments

(2 attachments)

Reporter

Description

5 years ago
There is no sound when playing the following games:
http://files.unity3d.com/jonas/DT2/
https://www.unrealengine.com/html5/
There might be other games that reproduce the problem.

This a recent regression:
Last good revision: dd2018a5f894 (2014-08-27)
First bad revision: 3be45b58fc47 (2014-08-28)
Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=dd2018a5f894&tochange=3be45b58fc47

Last good revision: fff4d503ad88
First bad revision: a71337656d0c
Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=fff4d503ad88&tochange=a71337656d0c

Not repro on 33.0a2 (2014-08-28).
Repro on Win and Mac, but not on Linux.
Reporter

Updated

5 years ago
Flags: needinfo?(paul)
Assignee

Comment 1

5 years ago
I'm on it.

I can repro, and I found that if you reload the page, it works.
Flags: needinfo?(paul)
Assignee

Comment 2

5 years ago
This makes the driver switching logic more robust against other bugs.
Attachment #8481271 - Flags: review?(rjesup)
Assignee

Updated

5 years ago
Assignee: nobody → paul
Assignee

Comment 3

5 years ago
This prevent a bug where the graph would be using a SystemClockDriver even if it
was rendering Web Audio API content.

It went like this:
- An AudioContext was created.
- Some AudioNodeStream (Web Audio API MediaStreams) were created, but their
MediaStreamTrack was not added yet
- During the stream ordering, we would see that we were running an
AudioCallbackDriver (because the MSG was created using an AudioContext, and we
pass in hints regarding the type of MediaStreams that will be added in the
future, to open the audio stream as early as we can, because it can take some
time, the MSG was created directly using an AudioCallbackDriver)
- Also during the stream ordering, we see that none of our MediaStream have an
MediaStreamTrack with an audio track. This triggers a switch to a
SystemClockDriver, because the graph thinks there is no audio.
- During CreateAndDestroyAudioNode, we would not switch to an
AudioCallbackDriver on the first iteration (right after the UpdateStreamOrder
call), because we would be switching, and not during the iterations after,
because we thought we already switched (the first patch makes this more robust).

This basically forces an AudioCallbackDriver if there is an AudioNodeStream,
which prevents unnecessary GraphDriver switches (and save threads creation
destruction, audio stream create and destruction, and all other resources
associated with a GraphDriver).
Attachment #8481274 - Flags: review?(rjesup)
Attachment #8481274 - Flags: review?(rjesup) → review+
Attachment #8481271 - Flags: review?(rjesup) → review+
Assignee

Comment 6

5 years ago
Relanded part one, it's enough to fix this.

https://hg.mozilla.org/integration/mozilla-inbound/rev/8fbff7a08820
https://hg.mozilla.org/mozilla-central/rev/8fbff7a08820
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Reporter

Comment 8

5 years ago
Verified fixed 34.0a1 (2014-09-02), Win 7 x64, OS X 10.8.5
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.