Граф коммитов

1391 Коммитов

Автор SHA1 Сообщение Дата
Andreas Pehrson 778a50400e Bug 1454998 - Remove track blocking from MediaInputPort. r=karlt
This functionality is not used since we moved to only having a single track per
MediaStream (bug 1493613).

Differential Revision: https://phabricator.services.mozilla.com/D47686

--HG--
extra : moz-landing-system : lando
2019-10-02 08:12:28 +00:00
Paul Adenot 7f8e465155 Bug 1583512 - Remove remaining references to doppler shift from AudioBufferSourceNode. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D46934

--HG--
extra : moz-landing-system : lando
2019-09-24 23:52:21 +00:00
alwu e3fa191af4 Bug 1580659 - part6 : remove input config parameter from 'NotifyStartedPlaying()'. r=Ehsan
After applying patch4, now we would pull the change from `AudioChannelService` everytime after starting the agent, so we don't need to rely on letting `NotifyStartedPlaying()` to modify the config and use it to update our state.

Differential Revision: https://phabricator.services.mozilla.com/D45753

--HG--
extra : moz-landing-system : lando
2019-09-24 21:18:07 +00:00
Alastor Wu 330adf4d9e Bug 1580659 - part5 : stop audio capturing explicitly. r=chunmin,karlt
As we start audio capturing explicitly, we should also take responsibility to stop audio capturing when we don't need it.

We were hiding too many details on `AudioChannelAgent` before, which allow us hard to know who and where we handle audio capturing.

Differential Revision: https://phabricator.services.mozilla.com/D45752

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:39 +00:00
alwu d158e0c4b2 Bug 1580659 - part4 : pulling the intial update after starting AudioChannelAgent. r=chunmin
Instead of calling those callback functions seperately, we could provide a function to pull those changes at once after starting the agent.

In addition, `WindowXXXChanged` are callback functions of `nsIAudioChannelAgentCallback`, so they should only be called by `AudioChannelAgent`, to indicate receiving the change from `AudioChannelService`. We should not call them directly.

Differential Revision: https://phabricator.services.mozilla.com/D45751

--HG--
extra : moz-landing-system : lando
2019-09-24 21:17:59 +00:00
Alastor Wu 5d31bee21f Bug 1580659 - part3 : call 'WindowAudioCaptureChanged()' explicitly. r=chunmin,karlt
Previously `AudioChannelService` called `WindowAudioCaptureChanged()` implicitly whenever we added the agent to the service [1], which made the audio capturing callback happen before finishing registration.

There are two drawbacks,
(1) it's hard to be aware of that the audio capturing callback would be called before finishing `AudioChannelAgent::NotifyStartedPlaying()` [2], which causes unclear call flow.

(2) If someone checks `AudioChannelAgent::IsPlayingStarted()` [3] inside audio capturing callback, then we would find that the `mIsRegToService` is false even if we have registered the agent to `AudioChannelService` because `mIsRegToService` is updated in the last line in the `AudioChannelAgent::NotifyStartedPlaying()`, but the audio capturing callback could be executed before that.

[1] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelService.cpp#723
[2] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#144
[3] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#285

Differential Revision: https://phabricator.services.mozilla.com/D45750

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:43 +00:00
alwu ba0d878e47 Bug 1580659 - part1 : use AudioChannelAgent directly. r=chunmin
`nsIAudioChannelAgent` was created a common interface for a usage of in both js and C++ before, now we have no any JS code would use `nsIAudioChannelAgent`, it's only used in C++ code.

Therefore, in a coming refactoring (bug1580662), we will remove `nsIAudioChannelAgent` and use `AudioChannelAgent` as the only interface. Here we can make these classes start to reference `AudioChannelAgent`, instead of `nsIAudioChannelAgent`.

Differential Revision: https://phabricator.services.mozilla.com/D45748

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:29 +00:00
shindli bfa22f415b Backed out 9 changesets (bug 1580659) for causing linting failure in /builds/worker/checkouts/gecko/dom/plugins/base/nsNPAPIPluginInstance.cpp CLOSED TREE
Backed out changeset b8c46aaec410 (bug 1580659)
Backed out changeset fd31977767d5 (bug 1580659)
Backed out changeset 8b9f61694270 (bug 1580659)
Backed out changeset 276827f54c71 (bug 1580659)
Backed out changeset ecb2bf9fb452 (bug 1580659)
Backed out changeset b712f15af619 (bug 1580659)
Backed out changeset c25bfc8b31b1 (bug 1580659)
Backed out changeset 20cfcd96a40e (bug 1580659)
Backed out changeset e92ff4ac7f43 (bug 1580659)
2019-09-24 09:50:42 +03:00
Alastor Wu b3e82e167d Bug 1580659 - part6 : remove input config parameter from 'NotifyStartedPlaying()'. r=Ehsan
After applying patch4, now we would pull the change from `AudioChannelService` everytime after starting the agent, so we don't need to rely on letting `NotifyStartedPlaying()` to modify the config and use it to update our state.

Differential Revision: https://phabricator.services.mozilla.com/D45753

--HG--
extra : moz-landing-system : lando
2019-09-18 00:03:14 +00:00
Alastor Wu eaf6b8ef6e Bug 1580659 - part5 : stop audio capturing explicitly. r=chunmin,karlt
As we start audio capturing explicitly, we should also take responsibility to stop audio capturing when we don't need it.

We were hiding too many details on `AudioChannelAgent` before, which allow us hard to know who and where we handle audio capturing.

Differential Revision: https://phabricator.services.mozilla.com/D45752

--HG--
extra : moz-landing-system : lando
2019-09-21 02:21:58 +00:00
Alastor Wu 17d1e17425 Bug 1580659 - part4 : pulling the intial update after starting AudioChannelAgent. r=chunmin
Instead of calling those callback functions seperately, we could provide a function to pull those changes at once after starting the agent.

In addition, `WindowXXXChanged` are callback functions of `nsIAudioChannelAgentCallback`, so they should only be called by `AudioChannelAgent`, to indicate receiving the change from `AudioChannelService`. We should not call them directly.

Differential Revision: https://phabricator.services.mozilla.com/D45751

--HG--
extra : moz-landing-system : lando
2019-09-23 17:44:21 +00:00
Alastor Wu f74da16941 Bug 1580659 - part3 : call 'WindowAudioCaptureChanged()' explicitly. r=chunmin,karlt
Previously `AudioChannelService` called `WindowAudioCaptureChanged()` implicitly whenever we added the agent to the service [1], which made the audio capturing callback happen before finishing registration.

There are two drawbacks,
(1) it's hard to be aware of that the audio capturing callback would be called before finishing `AudioChannelAgent::NotifyStartedPlaying()` [2], which causes unclear call flow.

(2) If someone checks `AudioChannelAgent::IsPlayingStarted()` [3] inside audio capturing callback, then we would find that the `mIsRegToService` is false even if we have registered the agent to `AudioChannelService` because `mIsRegToService` is updated in the last line in the `AudioChannelAgent::NotifyStartedPlaying()`, but the audio capturing callback could be executed before that.

[1] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelService.cpp#723
[2] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#144
[3] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#285

Differential Revision: https://phabricator.services.mozilla.com/D45750

--HG--
extra : moz-landing-system : lando
2019-09-18 21:59:32 +00:00
alwu 8c34182874 Bug 1580659 - part1 : use AudioChannelAgent directly. r=chunmin
`nsIAudioChannelAgent` was created a common interface for a usage of in both js and C++ before, now we have no any JS code would use `nsIAudioChannelAgent`, it's only used in C++ code.

Therefore, in a coming refactoring (bug1580662), we will remove `nsIAudioChannelAgent` and use `AudioChannelAgent` as the only interface. Here we can make these classes start to reference `AudioChannelAgent`, instead of `nsIAudioChannelAgent`.

Differential Revision: https://phabricator.services.mozilla.com/D45748

--HG--
extra : moz-landing-system : lando
2019-09-16 19:44:37 +00:00
Boris Zbarsky 417c6749c3 Bug 1581276. Require a message arg to ThrowDOMException. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D46250

--HG--
extra : moz-landing-system : lando
2019-09-20 02:17:01 +00:00
Boris Zbarsky dbed44ddf4 Bug 1581315 part 2. Fix incorrect behavior of PannerNode::SetRolloffFactor. r=karlt
Our implementation modified the state, in addition to throwing the exception.
And the tests not only didn't test for this, but wouldn't have reached that
code anyway, due to the harness giving up as soon as anything failed.

Differential Revision: https://phabricator.services.mozilla.com/D46106

--HG--
extra : moz-landing-system : lando
2019-09-17 22:15:54 +00:00
Boris Zbarsky e26682d684 Bug 1581173 part 1. Add a way to more easily throw TypeErrors and RangeErrors with custom message strings via ErrorResult. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45932

--HG--
extra : moz-landing-system : lando
2019-09-20 02:19:18 +00:00
Nathan Froyd 970d3a1d9b Bug 1582812 - fix some dom/media/ header cargo-culting; r=mccr8
Both of these files obviously use things from the newly-included
headers, but they were not including them prior to this point.

Differential Revision: https://phabricator.services.mozilla.com/D46632

--HG--
extra : moz-landing-system : lando
2019-09-20 20:19:32 +00:00
Boris Zbarsky 1128b8dee8 Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D45394

--HG--
extra : moz-landing-system : lando
2019-09-12 11:01:17 +00:00
Geoff Brown 56ca134785 Bug 1579272 - Cleanup obviously fennec-centric test annotations; r=bc
Remove test manifest annotations that specifically target fennec,
or likely target the android 4.3 emulator.

Differential Revision: https://phabricator.services.mozilla.com/D45018

--HG--
extra : moz-landing-system : lando
2019-09-06 16:51:10 +00:00
Karl Tomlinson 6b19f33045 Bug 1578623 create worklet global with JSPrincipals having reference to WorkletImpl r=baku,bzbarsky
This will permit implementation of JSPrincipals::write().

Differential Revision: https://phabricator.services.mozilla.com/D44604

--HG--
rename : dom/worklet/WorkletPrincipal.cpp => dom/worklet/WorkletPrincipals.cpp
rename : dom/worklet/WorkletPrincipal.h => dom/worklet/WorkletPrincipals.h
extra : moz-landing-system : lando
2019-09-06 02:01:44 +00:00
Andreas Pehrson 12adbb075f Bug 1577184 - Guard against a shutting down AudioContext in MediaElementAudioSourceNode. r=karlt
Depends on D44486

Differential Revision: https://phabricator.services.mozilla.com/D44487

--HG--
extra : moz-landing-system : lando
2019-09-03 23:33:54 +00:00
Eric Rahm 74b57d4f28 Bug 1577932 - Remove using namespace std from dom/media r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D44289

--HG--
extra : moz-landing-system : lando
2019-09-02 12:40:00 +00:00
Paul Adenot b3f91d148e Bug 1576656 - Only allow setting an AudioBuffer as convolution impulse if it has the same sample-rate than the associated AudioContext. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D43477

--HG--
extra : moz-landing-system : lando
2019-09-02 13:06:29 +00:00
Paul Adenot f766c2a6d2 Bug 1572878 - Compute the reverb on the main thread. r=karlt
This is necessary to keep the invariant that once the setter returns, the reverb
is ready to process.

Differential Revision: https://phabricator.services.mozilla.com/D43476

--HG--
extra : moz-landing-system : lando
2019-09-02 12:58:51 +00:00
Paul Adenot d8326c0e70 Bug 1572878 - Add a new method on AudioNodeStream, to be able to set a Reverb object on a ConvolverNode, from the main thread, using a ControlMessage. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D42900

--HG--
extra : moz-landing-system : lando
2019-09-02 12:58:40 +00:00
Mark Banner 351d147e2f Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44149

--HG--
extra : moz-landing-system : lando
2019-09-02 11:22:27 +00:00
Sylvestre Ledru 759eed09b4 Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in dom/media r=jya
Depends on D43776

Differential Revision: https://phabricator.services.mozilla.com/D43778

--HG--
extra : moz-landing-system : lando
2019-08-30 05:44:13 +00:00
Andrew McCreight 62bd52a17f Bug 1575343, part 1 - Avoid a gratuitous string copy by calling the nsAString overload of GetCallingLocation. r=smaug
The nsAString overload of GetCallingLocation directly converts the
original source file name string into an nsAString. A number of
callers that want the source file name in an nsAString are calling the
nsACString overload of GetCallingLocation, then calling
NS_ConvertUTF8toUTF16. This results in an extra intermediate copy of
the original string data.

Differential Revision: https://phabricator.services.mozilla.com/D42727

--HG--
extra : moz-landing-system : lando
2019-08-20 22:53:49 +00:00
Dan Minor e6817b0e4d Bug 1573541 - Fix assertion failure in PannerNode.h; r=karlt
This removes the call to SetThreeDPointParameter which is no longer necessary
now that we're using AudioParams for position and orientation. Doing the
conversion can cause an assertion failure when the AudioParams have a scheduled
future value.

Differential Revision: https://phabricator.services.mozilla.com/D42023

--HG--
extra : moz-landing-system : lando
2019-08-15 21:17:36 +00:00
Jared Wein 90c83c7843 Bug 1571567 - Fix no-fallthrough errors in /dom. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D40874

--HG--
extra : moz-landing-system : lando
2019-08-08 15:18:45 +00:00
Bogdan Tara 844afcfb06 Backed out 10 changesets (bug 1571567) complementary backout after es lint failure on the patch CLOSED TREE
Backed out changeset ce83fa75ae32 (bug 1571567)
Backed out changeset 7aa97ba7cce9 (bug 1571567)
Backed out changeset 777d79076e99 (bug 1571567)
Backed out changeset fbdf6b75a484 (bug 1571567)
Backed out changeset e2ed4620f232 (bug 1571567)
Backed out changeset 2c67015f12c6 (bug 1571567)
Backed out changeset 7ec086bb5bd5 (bug 1571567)
Backed out changeset 42df735c8556 (bug 1571567)
Backed out changeset 7d5fc57b2809 (bug 1571567)
Backed out changeset 606bafb8211c (bug 1571567)
2019-08-08 18:13:54 +03:00
Jared Wein a0b4a0401b Bug 1571567 - Fix no-fallthrough errors in /dom. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D40874

--HG--
extra : moz-landing-system : lando
2019-08-08 01:38:50 +00:00
Andreas Pehrson f95bb47fbc Bug 1570684 - Don't access MediaStreamTrack::mStream after the track has ended. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D40397

--HG--
extra : moz-landing-system : lando
2019-08-02 12:02:05 +00:00
Andreas Pehrson 4b3fa9c67e Bug 1493613 - Move MediaStream control from DOMMediaStream to MediaStreamTrack. r=padenot
This is inherently large, because modifying these bits of DOMMediaStream and
MediaStreamTrack affects all consumers and producers of all DOMMediaStreams and
MediaStreamTracks.

Things are generally much simpler now.

Producers of tracks now create a MediaStream in the graph, add it to a
MediaStreamTrackSource subclass that takes ownership of it, and add the source
to a MediaStreamTrack. Should the producer need a DOMMediaStream it is now much
simpler to create as the only thing needed is the current window. The stream is
a rather simple wrapper around an array of MediaStreamTracks.

HTMLMediaElement is still not as straight forward as other consumers since it
consumes the DOMMediaStream directly, as opposed to a set of tracks.
The new MediaStreamRenderer helper class helps bridge the gap between this fact
and the new track-based MediaStreamGraph interface, as it needs to juggle
registering multiple audio tracks for audio output. This hooks into existing
HTMLMediaElement logic and brings a welcome simplification to all the glue
previously needed there.

Differential Revision: https://phabricator.services.mozilla.com/D37934

--HG--
extra : moz-landing-system : lando
2019-07-31 07:58:17 +00:00
Paul Adenot 834e954d9f Bug 1570015 - Fix test_waveShaperGain.html by placing the <pre> tag before the script. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D39893

--HG--
extra : moz-landing-system : lando
2019-07-30 16:41:15 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Karl Tomlinson 35faeb0880 bug 1558123 call AudioWorkletProcessor.process() r=padenot,bzbarsky
https://heycam.github.io/webidl/#call-a-user-objects-operation may be a
simpler option here, but there are some small optimizations possible with
using JS::Call() directly:
JS::ExposeObjectToActiveJS() is not necessary because parameters are
PersistentRooted and so won't be gray.  MaybeWrapObjectValue() is not
necessary because parameters are already in the appropriate compartment.

See also https://github.com/WebAudio/web-audio-api/issues/1967 and
https://github.com/WebAudio/web-audio-api/issues/1933

Microtask support is tracked in
https://bugzilla.mozilla.org/show_bug.cgi?id=1566312

Differential Revision: https://phabricator.services.mozilla.com/D34838

--HG--
extra : moz-landing-system : lando
2019-07-17 08:20:45 +00:00
Karl Tomlinson 87d828f979 Bug 1558123 copy audio samples to/from JS arrays r=padenot
Direct use of aInput buffers for ArrayBuffer elements is not possible in
general.  aInput buffers are const because they may be used elsewhere but
ArrayBuffer elements may be modified by script.  If necessary, it would be
possible to later add a mechanism to mix inputs directly into the ArrayBuffer,
but often no mixing is required.

Direct use of output ArrayBuffer elements would require DetachArrayBuffer to
ensure the elements are not modified by script, but that would require
creation of a new ArrayBuffer JS object on each call.

https://github.com/WebAudio/web-audio-api/issues/1932 tracks specification of
making output data available for reading (for downstream node input).

Differential Revision: https://phabricator.services.mozilla.com/D34837

--HG--
extra : moz-landing-system : lando
2019-07-17 06:36:43 +00:00
Karl Tomlinson 44690447a6 bug 1558123 create JSObjects for inputs/outputs AudioWorkletProcessor.process() parameters r=padenot,bzbarsky
Objects are retained for re-use so as to reduce garbage generation and other
performance benefits.  This is currently unspecified.

https://github.com/WebAudio/web-audio-api/issues/1934
https://github.com/WebAudio/web-audio-api/issues/1933

https://github.com/WebAudio/web-audio-api/issues/1935 tracks specification of
zero-channels of input when inputs are not actively processing.

Differential Revision: https://phabricator.services.mozilla.com/D34836

--HG--
extra : moz-landing-system : lando
2019-07-16 20:27:39 +00:00
Karl Tomlinson 46486e57c9 bug 1558123 set AudioWorkletNode output channel counts r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D34835

--HG--
extra : moz-landing-system : lando
2019-07-16 04:40:33 +00:00
Karl Tomlinson 442e4282a1 Bug 1558123 Pass spans to ProcessBlocksOnPorts to facilitate forwarding from ProcessBlock() r=padenot
It is easier to make a span than an nsTArray.

This also clarifies that the output array lengths are not modified.

Depends on D34833

Differential Revision: https://phabricator.services.mozilla.com/D34834

--HG--
extra : moz-landing-system : lando
2019-06-14 16:06:22 +00:00
Karl Tomlinson 2f7457ad55 Bug 1542931 Construct AudioWorkletProcessor for each AudioWorkletNode r=padenot,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D34482

--HG--
extra : moz-landing-system : lando
2019-07-17 18:58:57 +00:00
Karl Tomlinson ff940f743d Bug 1542931 add a mechanism to notify engine on graph thread of forced shutdown r=padenot
This will be used to release the AudioWorkletProcessor on the correct thread.

Depends on D34480

Differential Revision: https://phabricator.services.mozilla.com/D34481

--HG--
extra : moz-landing-system : lando
2019-06-14 15:04:48 +00:00
Karl Tomlinson 64d6bd309f Bug 1542931 add WorkletNodeEngine and send control message for processor construction r=padenot
Depends on D34479

Differential Revision: https://phabricator.services.mozilla.com/D34480

--HG--
extra : moz-landing-system : lando
2019-06-14 15:04:12 +00:00
Karl Tomlinson 4891262c8d Bug 1542931 serialize AudioWorkletNodeOptions r=padenot
Depends on D34478

Differential Revision: https://phabricator.services.mozilla.com/D34479

--HG--
extra : moz-landing-system : lando
2019-06-14 13:23:57 +00:00
Karl Tomlinson 0d0c740557 Bug 1542931 Add AudioWorkletProcessorConstructor r=bzbarsky
https://github.com/WebAudio/web-audio-api/issues/1839

Depends on D34476

Differential Revision: https://phabricator.services.mozilla.com/D34477

--HG--
extra : moz-landing-system : lando
2019-06-11 15:45:45 +00:00
Karl Tomlinson f94d893bf3 Bug 1542931 move forward declarations to appropriate namespaces r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D34476

--HG--
extra : moz-landing-system : lando
2019-06-14 13:23:29 +00:00
Karl Tomlinson 3a7eaf6860 Bug 1558123 don't set outputs array length in ProcessBlocksOnPorts r=padenot
This is set in the AudioNodeStream constructor and does not change.

Differential Revision: https://phabricator.services.mozilla.com/D34833

--HG--
extra : moz-landing-system : lando
2019-06-14 15:40:00 +00:00
Paul Adenot c74b95c375 Bug 1350973 - Implement new attributes MediaStreamAudioSourceNode.mediaStream and MediaElementAudioSourceNode.mediaElement. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37283

--HG--
extra : moz-landing-system : lando
2019-07-11 20:09:58 +00:00
Paul Adenot 6d8671ebb8 Bug 1564422 - Change `outputLatency` and `getOutputTimestamp` when `resistFingerPrinting` is enabled. r=tjr
When Firefox is configured to resist fingerprinting, the latency figure returned
is the most commonly found on a particular OS.

For Android, I got data from [0], roughly copy/pasted the table into a file and
did:

```
cat file | cut -d $'\t' -f4 | grep "^[[:digit:]]" | cut -d ' ' -f 1 | sort -h
| uniq -c | sort -h
```

which indicated that 40ms was a good number for round trip latency (input to
output). Since this is for output latency only and the audio path
is roughly symmetrical in terms of duration, we report 20ms.

For OSX, 512 is always used with the default hardware in Firefox, with this
patch, it's always 512 regardless of the setup.

On Linux/Pulse, we use 25ms [1] always, and this is adjusted by PulseAudio. This
makes it always return 25ms.

On Windows, there is a wide variety of configurations, but it's common to be in
the ballpark of 80ms output (this is very empirical, by testing a bunch of
hardware over the years).

For other OSes, we use 2048 frames (adjusted to the sample-rate).

[0]: https://superpowered.com/latency
[1]: https://searchfox.org/mozilla-central/source/media/libcubeb/src/cubeb_pulse.c#725

Differential Revision: https://phabricator.services.mozilla.com/D37723

--HG--
extra : moz-landing-system : lando
2019-07-12 11:27:25 +00:00
Paul Adenot 553f80fde6 Bug 1324545 - Implement AudioContext getOutputTimestamp(). r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37281

--HG--
extra : moz-landing-system : lando
2019-07-12 11:27:25 +00:00
Paul Adenot 8c692f2f23 Bug 1324552 - Implement AudioContext baseLatency and outputLatency attributes. r=pehrsons,baku
Differential Revision: https://phabricator.services.mozilla.com/D37280

--HG--
extra : moz-landing-system : lando
2019-07-12 11:28:03 +00:00
shindli 883c6619a6 Backed out 3 changesets (bug 1324552, bug 1324545, bug 1350973) for causing perma mda leakcheck failures CLOSED TREE
Backed out changeset db14e59c7e6e (bug 1324545)
Backed out changeset 088e13476d39 (bug 1324552)
Backed out changeset e79a64fc49e7 (bug 1350973)
2019-07-11 18:55:03 +03:00
Paul Adenot e66a2c4316 Bug 1324545 - Implement AudioContext getOutputTimestamp(). r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37281

--HG--
extra : moz-landing-system : lando
2019-07-11 13:34:15 +00:00
Paul Adenot 4c99611f32 Bug 1324552 - Implement AudioContext baseLatency and outputLatency attributes. r=pehrsons,baku
Differential Revision: https://phabricator.services.mozilla.com/D37280

--HG--
extra : moz-landing-system : lando
2019-07-11 13:30:07 +00:00
Paul Adenot 03e7bf883c Bug 1350973 - Implement new attributes MediaStreamAudioSourceNode.mediaStream and MediaElementAudioSourceNode.mediaElement. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37283

--HG--
extra : moz-landing-system : lando
2019-07-11 13:18:51 +00:00
Paul Adenot 7786a2a4d6 Bug 1456263 - Throw appropriate errors in the ChannelMergerNode ctor. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D37433

--HG--
extra : moz-landing-system : lando
2019-07-10 01:31:21 +00:00
Andreas Pehrson 378c51c9f8 Bug 1177793 - Pass principal instead of forcing black when capturing cross-origin media resource. r=jya,jib
Differential Revision: https://phabricator.services.mozilla.com/D36896

--HG--
extra : moz-landing-system : lando
2019-07-08 21:15:10 +00:00
Emilio Cobos Álvarez 1a39c45ae2 Bug 1563728 - Add a return statement to BiquadFilterNode::GetFrequencyResponse to fix bustage. rs=padenot
CLOSED TREE
2019-07-06 10:45:56 +02:00
Paul Adenot 3ffaf1696e Bug 1563728 - Throw when the three parameters of BiquadFilterNode.getFrequencyResponse aren't of the same size. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37056

--HG--
extra : moz-landing-system : lando
2019-07-05 20:34:47 +00:00
Paul Adenot f5a83e7113 Bug 893020 - Make AudioParam.value getter return a value based on the AudioContext.currentTime. r=karlt
AudioWG resolution: https://github.com/WebAudio/web-audio-api/issues/1788#issuecomment-468345987

Differential Revision: https://phabricator.services.mozilla.com/D30909

--HG--
extra : moz-landing-system : lando
2019-05-14 05:17:00 +00:00
Victor Porof 0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35951

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Paul Adenot 1877aafe44 Bug 1563193 - Remove "media.webaudio.audiocontextoptions-samplerate.enabled". r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D36733

--HG--
extra : moz-landing-system : lando
2019-07-03 12:12:15 +00:00
Nicholas Nethercote d839ef58db Bug 1562331 - Make media.* static prefs follow the naming convention. r=KrisWright
This also removes the following prefs, because they're unused:
- media.autoplay.allow-muted pref
- media.autoplay.blackList-override-default

Differential Revision: https://phabricator.services.mozilla.com/D36396

--HG--
extra : rebase_source : 0570540496302b3efedadf4d5115ee5422d5c279
2019-06-28 14:09:05 +10:00
Paul Adenot 7bcb7bb6a6 Bug 1553215 - Implement the correct behaviour for MediaStreamAudioSource. r=karlt,pehrsons
It should pick and lock to the right track, regardless of if it's still in the
MediaStream.

The test fix is because we don't expose tracks until the HTMLMediaElement has
loaded loading I think.

This alignes with a couple spec changes:
- https://github.com/WebAudio/web-audio-api/issues/264
- https://github.com/WebAudio/web-audio-api/pull/1829/files

and also throws when no valid track are found in the MediaStream, either because
it's all video tracks or because it has no tracks.

Differential Revision: https://phabricator.services.mozilla.com/D32176

--HG--
extra : moz-landing-system : lando
2019-06-19 23:06:33 +00:00
Paul Adenot 266b9570eb Bug 1056706 - Reenable a couple tests on Android. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D35289

--HG--
extra : moz-landing-system : lando
2019-06-19 22:15:25 +00:00
Mark Banner 201255ab84 Bug 1558485 - Turn on ESLint for all of dom/ disabling most of the failing rules. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34761

--HG--
extra : moz-landing-system : lando
2019-06-13 20:21:46 +00:00
Oana Pop Rus 6a33762809 Backed out 2 changesets (bug 1553215) for Web platform tests failures in mediastreamaudiosourcenode-routing.html
Backed out changeset 992d3dd0cee0 (bug 1553215)
Backed out changeset fad5e3bf0695 (bug 1553215)
2019-06-12 15:51:21 +03:00
Paul Adenot ed9ef40332 Bug 1553215 - Implement the correct behaviour for MediaStreamAudioSource. r=karlt,pehrsons
It should pick and lock to the right track, regardless of if it's still in the
MediaStream.

The test fix is because we don't expose tracks until the HTMLMediaElement has
loaded loading I think.

This alignes with a couple spec changes:
- https://github.com/WebAudio/web-audio-api/issues/264
- https://github.com/WebAudio/web-audio-api/pull/1829/files

and also throws when no valid track are found in the MediaStream, either because
it's all video tracks or because it has no tracks.

Differential Revision: https://phabricator.services.mozilla.com/D32176

--HG--
extra : moz-landing-system : lando
2019-06-11 09:51:21 +00:00
Cosmin Sabou a4d22c5fcd Backed out 2 changesets (bug 1553215) for mda failures on test_audioContextSuspendResumeClose.html.
Backed out changeset 71154c8ef814 (bug 1553215)
Backed out changeset 80181b642f81 (bug 1553215)
2019-06-10 20:48:26 +03:00
Paul Adenot 2e2b6d25cb Bug 1553215 - Implement the correct behaviour for MediaStreamAudioSource. r=karlt,pehrsons
It should pick and lock to the right track, regardless of if it's still in the
MediaStream.

The test fix is because we don't expose tracks until the HTMLMediaElement has
loaded loading I think.

This alignes with a couple spec changes:
- https://github.com/WebAudio/web-audio-api/issues/264
- https://github.com/WebAudio/web-audio-api/pull/1829/files

and also throws when no valid track are found in the MediaStream, either because
it's all video tracks or because it has no tracks.

Differential Revision: https://phabricator.services.mozilla.com/D32176

--HG--
extra : moz-landing-system : lando
2019-06-10 15:33:12 +00:00
Boris Zbarsky 328fedf055 Bug 1121623 part 4. Remove AudioScheduledSourceNode::WrapObject. r=padenot
It's dead code, because AudioScheduledSourceNode is an abstract class and all
subclasses override WrapObject.

Differential Revision: https://phabricator.services.mozilla.com/D32202

--HG--
extra : moz-landing-system : lando
2019-05-23 11:40:14 +00:00
Paul Adenot cadd6ec6ca Bug 1549041 - Destroy the AudioChannelAgent in CloseInternal instead of Close. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D30638

--HG--
extra : moz-landing-system : lando
2019-05-17 09:46:25 +00:00
Karl Tomlinson 562c78800b Bug 1548816 be consistent about number of frames copied r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D30159

--HG--
extra : moz-landing-system : lando
2019-05-07 11:17:54 +00:00
Boris Zbarsky ff72e84ac1 Bug 1547923 part 4. Add nsIGlobalObject::HasJSGlobal(). r=mccr8
Consumers that just care about this boolean state should use this instead of
getting the JSObject* directly.

Differential Revision: https://phabricator.services.mozilla.com/D29705

--HG--
extra : moz-landing-system : lando
2019-05-02 21:32:17 +00:00
Boris Zbarsky 248fcf067d Bug 1547923 part 1. Remove unused callers of GetGlobalJSObject. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D29702

--HG--
extra : moz-landing-system : lando
2019-05-02 18:37:52 +00:00
Valentin Millet d934ec2ff8 Bug 1530178 - copyFromChannel/copyToChannel until end of buffer when destination/source is longer r=padenot,karlt
than available space, as clarified in https://github.com/WebAudio/web-audio-api/issues/1004

Differential Revision: https://phabricator.services.mozilla.com/D25791

--HG--
extra : moz-landing-system : lando
2019-05-02 09:24:57 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Jan-Ivar Bruaroey 6b8d3b7ad8 Bug 1335740 - Update wpt & mochitests to work w/[SecureContext] navigator.mediaDevices. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D20425

--HG--
rename : testing/web-platform/meta/mediacapture-streams/MediaDevices-getSupportedConstraints.html.ini => testing/web-platform/meta/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html.ini
rename : testing/web-platform/tests/mediacapture-streams/MediaDevices-getSupportedConstraints.html => testing/web-platform/tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html
extra : moz-landing-system : lando
2019-04-30 15:20:53 +00:00
Andreas Pehrson 39580a0cf7 Bug 1536766 - Remove unused MediaStream::HasCurrentData. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D27266

--HG--
extra : moz-landing-system : lando
2019-04-24 10:55:50 +00:00
Alastor Wu c58212fe27 Bug 1544023 - let AudioNode keep the reference of all AudioParams which belong to itself. r=padenot
When we suspend or resume the `AudioContext`, it should affect ALL media streams which belong to or are related to the `AudioNode` that are created by this `AudioContext`.

As `AudioNode::OutputParams()` can only return the connected AudioParams, it doesn't return the AudioParams which are belong to itself. That means we would miss to apply the suspend/resume operation for those streams, and it would cause imbalancing suspended count.

Therefore, we let `AudioNode` to keep the reference of all its AudioParam, and return them to `AudioContext` in order to do the operation for all streams.

Differential Revision: https://phabricator.services.mozilla.com/D28008

--HG--
extra : moz-landing-system : lando
2019-04-23 17:50:54 +00:00
Ciure Andrei add7a3fb9e Backed out 14 changesets (bug 1536766) for causing RunWatchdog and mediaElementAudioSource wpt failures CLOSED TREE
Backed out changeset 72d37a08f281 (bug 1536766)
Backed out changeset 63fc85885060 (bug 1536766)
Backed out changeset addbb04415cb (bug 1536766)
Backed out changeset f2923dfcf33c (bug 1536766)
Backed out changeset 25f3a33ec51b (bug 1536766)
Backed out changeset 199efe6aec59 (bug 1536766)
Backed out changeset f9d1f1bfe2b1 (bug 1536766)
Backed out changeset 87616997f160 (bug 1536766)
Backed out changeset 36f99fa3c956 (bug 1536766)
Backed out changeset 000260ba28de (bug 1536766)
Backed out changeset 6386ed1b7d74 (bug 1536766)
Backed out changeset ab27d9f5902a (bug 1536766)
Backed out changeset 4f6d240c210d (bug 1536766)
Backed out changeset 3e0e3030314d (bug 1536766)
2019-04-19 05:55:57 +03:00
Andreas Pehrson e63ff93e4d Bug 1536766 - Remove unused MediaStream::HasCurrentData. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D27266

--HG--
extra : moz-landing-system : lando
2019-04-18 15:24:12 +00:00
Andreea Pavel de5960a5f9 Bug 1543496 - disabled test_mediaStreamTrackAudioSourceNode.html on everything except debug r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D27739

--HG--
extra : moz-landing-system : lando
2019-04-16 16:29:45 +00:00
Brian Grinstead 0d460e3432 Bug 1544322 - Part 2.2 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in dom/ r=bzbarsky
This is split from the previous changeset since if we include dom/ the file size is too
large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

Differential Revision: https://phabricator.services.mozilla.com/D27457

--HG--
extra : moz-landing-system : lando
2019-04-16 03:53:28 +00:00
Sylvestre Ledru 7f60810d86 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D27245

--HG--
extra : moz-landing-system : lando
2019-04-12 13:14:25 +00:00
Léo Paquet 7c036d7475 Bug 1324548 - Add MediaStreamTrackAudioSourceNode. r=pehrsons,baku
MozReview-Commit-ID: IdVqfNigMyu

Differential Revision: https://phabricator.services.mozilla.com/D15958

--HG--
extra : moz-landing-system : lando
2019-04-10 12:14:17 +00:00
Paul Adenot 07dec0f992 Bug 1324548 - Tests for MediaStreamTrackAudioSourceNode. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D16066

--HG--
extra : moz-landing-system : lando
2019-04-10 12:14:15 +00:00
Sylvestre Ledru 03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Paul Adenot cbccf7ece3 Bug 1541467 - Handle situations where the document is not available from the AudioContext. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D25955

--HG--
extra : moz-landing-system : lando
2019-04-05 11:38:06 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Karl Tomlinson fe0b4da7b5 Bug 1541311 add support for AudioWorkletNode.numberOfInputs/Outputs r=padenot
There is no specified limit on the number of inputs or outputs, except that
the webidl parameter is unsigned long, but Gecko has an implementation-defined
limit.

Differential Revision: https://phabricator.services.mozilla.com/D25898

--HG--
extra : moz-landing-system : lando
2019-04-03 13:38:10 +00:00
Andreea Pavel 8633610e74 Backed out 2 changesets (bug 1324548) for failing wpt at idlharness.https.window.html on a CLOSED TREE
Backed out changeset 055578135fba (bug 1324548)
Backed out changeset 7aefaab277fe (bug 1324548)
2019-04-03 23:18:19 +03:00
Léo Paquet d761d81c93 Bug 1324548 - Add MediaStreamTrackAudioSourceNode. r=pehrsons,baku
MozReview-Commit-ID: IdVqfNigMyu

Differential Revision: https://phabricator.services.mozilla.com/D15958

--HG--
extra : moz-landing-system : lando
2019-04-03 17:01:38 +00:00
Paul Adenot 039c642c8e Bug 1324548 - Tests for MediaStreamTrackAudioSourceNode. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D16066

--HG--
extra : moz-landing-system : lando
2019-04-03 17:01:58 +00:00
Dorel Luca 47b5923c5b Backed out 2 changesets (bug 1324548) for Mochitest failures in dom/tests/mochitest/general/test_interfaces.html. CLOSED TREE
Backed out changeset fda93e03e469 (bug 1324548)
Backed out changeset 8e6135544e33 (bug 1324548)
2019-04-03 18:54:05 +03:00
Léo Paquet 13ed118524 Bug 1324548 - Add MediaStreamTrackAudioSourceNode. r=pehrsons,baku
MozReview-Commit-ID: IdVqfNigMyu

Differential Revision: https://phabricator.services.mozilla.com/D15958

--HG--
extra : moz-landing-system : lando
2019-04-03 14:00:28 +00:00