Closed Bug 1060311 Opened 8 years ago Closed 8 years ago

No sound in Unity/Unreal games


(Core :: Audio/Video, defect)

Windows 7
Not set



Tracking Status
firefox34 --- verified


(Reporter: pauly, Assigned: padenot)


(Blocks 1 open bug)


(Keywords: regression)


(2 files)

There is no sound when playing the following games:
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)

Last good revision: fff4d503ad88
First bad revision: a71337656d0c

Not repro on 33.0a2 (2014-08-28).
Repro on Win and Mac, but not on Linux.
Flags: needinfo?(paul)
I'm on it.

I can repro, and I found that if you reload the page, it works.
Flags: needinfo?(paul)
This makes the driver switching logic more robust against other bugs.
Attachment #8481271 - Flags: review?(rjesup)
Assignee: nobody → paul
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+
Relanded part one, it's enough to fix this.
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Verified fixed 34.0a1 (2014-09-02), Win 7 x64, OS X 10.8.5
You need to log in before you can comment on or make changes to this bug.