Web audio didn't produce sound even if AudioContext is resumed from blocked
Categories
(Core :: Web Audio, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: alwu, Assigned: alwu)
References
(Blocks 1 open bug, )
Details
Attachments
(3 files)
Fork from bug1511117 comment1, after clicking a keyborad key, the site would call OscillatorNode.start()
which would resume the AudioContext [1].
However, even the AudioContext has been resumed, I still can't hear any sound from web audio.
Assignee | ||
Comment 1•4 years ago
|
||
Hi, Paul,
Could you help me take a look for this issue?
Thank you!
Assignee | ||
Comment 2•4 years ago
|
||
Have found the root cause, will upload a patch and update my analysis later.
Assignee | ||
Comment 3•4 years ago
•
|
||
The root cause is that there was a stream which wasn't resumed by the AudioContext
because that stream was not belong to a Node, which resulted that AudioContext
can't get it when calling GetAllStreams()
.
The stream is created by the AudioParam
[1]. Therefore, this stream blocks other streams which were connected to the GainNode
, which resulted that AudioContext
didn't output any sound.
Assignee | ||
Comment 4•4 years ago
|
||
If the stream has not current AudioNode which means it's not controlled by AudioContext (like MediaRecorder's and AudioParam's stream) so their suspended count don't need to be adjusted by asking AudioContext. Therefore, we only change stream's suspended count when its node exists.
If we don't do so, the stream would have incorrect suspended count because AudioContext won't control the stream and have no way to resume it.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0f0f272b39ac part1 : to allow 'AudioContext::GetAllStreams()' to get helper streams. r=padenot https://hg.mozilla.org/integration/autoland/rev/986f3ebb901a part 2 : add test. r=padenot,smaug
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0f0f272b39ac
https://hg.mozilla.org/mozilla-central/rev/986f3ebb901a
Description
•