Commit Graph

95 Commits

Author SHA1 Message Date
Alex Chronopoulos
5ba3daa02c Bug 1387454 - Add AudioContextOptions in webidl. r=padenot,smaug
MozReview-Commit-ID: K4PApVzJffG
2018-04-03 20:02:15 +03:00
Nika Layzell
e5cd184550 Bug 1383876 - Part 1: Remove GroupedSHistory and Prerendering logic from C++ code, r=freesamael, r=smaug
MozReview-Commit-ID: 2aHA6NcQPGk
2018-01-12 17:52:52 -05:00
Paul Adenot
8bb3b4cace Bug 1361475 - Remove proprietary constructor on AudioContext. r=baku
This was used only for B2G, was proprietary, and is causing issues, because
`AudioContext` can now have a parameter that is a property bag, per spec
(although we haven't implemented it at the moment).

MozReview-Commit-ID: 6LOlNp0cbfV
2017-05-04 13:43:14 +02:00
Alastor Wu
c2ee741d03 Bug 1358061 - remove moz-audiochannel codes for media element and web audio. r=baku
MozReview-Commit-ID: KPuhxCVezOZ
2017-04-26 12:02:32 +08:00
Phil Ringnalda
9a4f26dd07 Backed out changeset 6e7efb9115fd (bug 1358061) for build bustage
CLOSED TREE

MozReview-Commit-ID: F9FSciVgynw
2017-04-25 20:55:30 -07:00
Alastor Wu
347fbb9c2e Bug 1358061 - remove moz-audiochannel codes for media element and web audio. r=baku
MozReview-Commit-ID: BwZ6vHUPnSB
2017-04-25 12:19:28 +08:00
Andrea Marchesini
4990e5c72d Bug 1324352 - Implement BaseAudioContext, r=padenot 2016-12-21 10:52:50 +01:00
Sebastian Hengst
284d84177a Backed out changeset 50a74758ee7d (bug 1324352) for failing webaudioeditor devtools tests like test/browser_audionode-actor-bypass.js. r=backout 2016-12-20 23:03:36 +01:00
Andrea Marchesini
a26b7bb27c Bug 1324352 - Implement BaseAudioContext, r=padenot 2016-12-20 20:20:41 +01:00
Andrea Marchesini
ec8f1ce350 Bug 1322982 - DOMException should be passed as argument in DecodeErrorCallback, r=padenot 2016-12-13 07:00:15 +01:00
Dan Minor
b39af61987 Bug 1308432 - Add webidl for ConstantSourceNode; r=smaug
MozReview-Commit-ID: 1VtsBk7icrW
2016-10-13 10:40:29 -04:00
Carsten "Tomcat" Book
2d792a728c Backed out changeset 1982ca04dbf4 (bug 1308432) 2016-10-19 14:37:56 +02:00
Dan Minor
53ae837520 Bug 1308432 - Add webidl for ConstantSourceNode; r=smaug
MozReview-Commit-ID: 1VtsBk7icrW
2016-10-13 10:40:29 -04:00
Paul Adenot
98bafe936b Bug 1288359 - Add a pref to disable the Web Audio API. r=karlt,smaug
MozReview-Commit-ID: 6h37P9PctYW
2016-07-22 13:59:52 +02:00
Paul Adenot
2c5513508f Bug 1282820 - Change the specification URL in webidl files for the Web Audio API. DONTBUILD. r=smaug
This patch has been written with this command, ran from the root of the tree:

```
gsed -i 's!https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html!https://webaudio.github.io/web-audio-api/!' dom/webidl/*
```
2016-06-29 11:30:13 +02:00
Dan Minor
3edf40545d Bug 1265408 - Add webidl for IIRFilterNode; r=smaug
MozReview-Commit-ID: FdaXR22KwUf
2016-06-07 05:50:16 -04:00
Wes Kocher
a144f1099a Backed out 13 changesets (bug 1265408) for test_interfaces bustage CLOSED TREE
Backed out changeset 5aa770304f2a (bug 1265408)
Backed out changeset 465412cecc51 (bug 1265408)
Backed out changeset d7d5bbd33e0e (bug 1265408)
Backed out changeset 4dd3a54d766d (bug 1265408)
Backed out changeset 24d271e05ae2 (bug 1265408)
Backed out changeset 56d602e3a9e6 (bug 1265408)
Backed out changeset 4bd3f7f5a431 (bug 1265408)
Backed out changeset 1b0ec5cf4d30 (bug 1265408)
Backed out changeset 784521a9cc94 (bug 1265408)
Backed out changeset 9ab327850c5f (bug 1265408)
Backed out changeset 388a95b05202 (bug 1265408)
Backed out changeset 2d59146a43fe (bug 1265408)
Backed out changeset 84fab8755ac9 (bug 1265408)
2016-06-06 12:09:14 -07:00
Dan Minor
34d32a6b73 Bug 1265408 - Add webidl for IIRFilterNode; r=smaug
MozReview-Commit-ID: FdaXR22KwUf
2016-04-26 13:59:11 -04:00
Dan Minor
675c07c5b8 Bug 1265405 - Add a dictionary to specify how PeriodicWave should be normalized (or not); r=smaug
MozReview-Commit-ID: CR5kO8MXdZv
2016-04-26 06:54:38 -04:00
Ehsan Akhgari
e9100c120f Bug 1180347 - Split media.useAudioChannelService to support turning the service on without turning the Firefox OS specific APIs on; r=baku
This is going to be needed for us to be able to turn the AudioChannelService
on for desktop without exposing the Firefox OS specific APIs.
2015-07-06 09:05:00 -04:00
Paul Adenot
68bd357d90 Bug 1094764 - Implement AudioContext.suspend and friends. r=roc,ehsan
- Relevant spec text:
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-suspend-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-resume-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-close-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-onstatechange

- In a couple words, the behavior we want:
    - Closed context cannot have new nodes created, but can do decodeAudioData,
    and create buffers, and such.
    - OfflineAudioContexts don't support those methods, transitions happen at
    startRendering and at the end of processing. onstatechange is used to make
    this observable.
    - (regular) AudioContexts support those methods. The promises and
    onstatechange should be resolved/called when the operation has actually
    completed on the rendering thread.  Once a context has been closed, it
    cannot transition back to "running". An AudioContext switches to "running"
    when the audio callback start running, this allow authors to know how long
    the audio stack takes to start running.
    - MediaStreams that feed in/go out of a suspended graph should respectively
    not buffer at the graph input, and output silence
    - suspended context should not be doing much on the CPU, and we should try
    to pause audio streams if we can (this behaviour is the main reason we need
    this in the first place, for saving battery on mobile, and CPU on all
    platforms)

- Now, the implementation:
    - AudioNodeStreams are now tagged with a context id, to be able to operate
    on all the streams of a given AudioContext on the Graph thread without
    having to go and lock everytime to touch the AudioContext. This happens in
    the AudioNodeStream ctor. IDs are of course constant for the lifetime of the
    node.
    - When an AudioContext goes into suspended mode, streams for this
    AudioContext are moved out of the mStreams array to a second array,
    mSuspendedStreams. Streams in mSuspendedStream are not ordered, and are not
    processed.
    - The MSG will automatically switch to a SystemClockDriver when it finds
    that there are no more AudioNodeStream/Stream with an audio track. This is
    how pausing the audio subsystem and saving battery works. Subsequently, when
    the MSG finds that there are only streams in mSuspendedStreams, it will go
    to sleep (block on a monitor), so we save CPU, but it does not shut itself
    down. This is mostly not a new behaviour (this is what the MSG does since
    the refactoring), but is important to note.
    - Promises are gripped (addref-ed) on the main thread, and then shepherd
    down other threads and to the GraphDriver, if needed (sometimes we can
    resolve them right away). They move between threads as void* to prevent
    calling methods on them, as they are not thread safe. Then, the driver
    executes the operation, and when it's done (initializing and closing audio
    streams can take some time), we send the promise back to the main thread,
    and resolve it, casting back to Promise* after asserting we're back on the
    main thread. This way, we can send them back on the main thread once an
    operation has complete (suspending an audio stream, starting it again on
    resume(), etc.), without having to do bookkeeping between suspend calls and
    their result. Promises are not thread safe, so we can't move them around
    AddRef-ed.
    - The stream destruction logic now takes into account that a stream can be
    destroyed while not being in mStreams.
    - A graph can now switch GraphDriver twice or more per iteration, for
    example if an author goes suspend()/resume()/suspend() in the same script.
    - Some operation have to be done on suspended stream, so we now use double
    for-loop around mSuspendedStreams and mStreams in some places in
    MediaStreamGraph.cpp.
    - A tricky part was making sure everything worked at AudioContext
    boundaries.  TrackUnionStream that have one of their input stream suspended
    append null ticks instead.
    - The graph ordering algorithm had to be altered to not include suspended
    streams.
    - There are some edge cases (adding a stream on a suspended graph, calling
    suspend/resume when a graph has just been close()d).
2015-02-27 18:22:05 +01:00
Carsten "Tomcat" Book
f2c24595c4 Backed out changeset 7fc52c48e6e3 (bug 1094764) for mulet m-3 perma failure in /test_dataChannel_basicAudioVideo.html 2015-04-09 13:44:27 +02:00
Paul Adenot
a7e65dc80a Bug 1094764 - Implement AudioContext.suspend and friends. r=roc,ehsan
- Relevant spec text:
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-suspend-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-resume-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-close-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-onstatechange

- In a couple words, the behavior we want:
    - Closed context cannot have new nodes created, but can do decodeAudioData,
    and create buffers, and such.
    - OfflineAudioContexts don't support those methods, transitions happen at
    startRendering and at the end of processing. onstatechange is used to make
    this observable.
    - (regular) AudioContexts support those methods. The promises and
    onstatechange should be resolved/called when the operation has actually
    completed on the rendering thread.  Once a context has been closed, it
    cannot transition back to "running". An AudioContext switches to "running"
    when the audio callback start running, this allow authors to know how long
    the audio stack takes to start running.
    - MediaStreams that feed in/go out of a suspended graph should respectively
    not buffer at the graph input, and output silence
    - suspended context should not be doing much on the CPU, and we should try
    to pause audio streams if we can (this behaviour is the main reason we need
    this in the first place, for saving battery on mobile, and CPU on all
    platforms)

- Now, the implementation:
    - AudioNodeStreams are now tagged with a context id, to be able to operate
    on all the streams of a given AudioContext on the Graph thread without
    having to go and lock everytime to touch the AudioContext. This happens in
    the AudioNodeStream ctor. IDs are of course constant for the lifetime of the
    node.
    - When an AudioContext goes into suspended mode, streams for this
    AudioContext are moved out of the mStreams array to a second array,
    mSuspendedStreams. Streams in mSuspendedStream are not ordered, and are not
    processed.
    - The MSG will automatically switch to a SystemClockDriver when it finds
    that there are no more AudioNodeStream/Stream with an audio track. This is
    how pausing the audio subsystem and saving battery works. Subsequently, when
    the MSG finds that there are only streams in mSuspendedStreams, it will go
    to sleep (block on a monitor), so we save CPU, but it does not shut itself
    down. This is mostly not a new behaviour (this is what the MSG does since
    the refactoring), but is important to note.
    - Promises are gripped (addref-ed) on the main thread, and then shepherd
    down other threads and to the GraphDriver, if needed (sometimes we can
    resolve them right away). They move between threads as void* to prevent
    calling methods on them, as they are not thread safe. Then, the driver
    executes the operation, and when it's done (initializing and closing audio
    streams can take some time), we send the promise back to the main thread,
    and resolve it, casting back to Promise* after asserting we're back on the
    main thread. This way, we can send them back on the main thread once an
    operation has complete (suspending an audio stream, starting it again on
    resume(), etc.), without having to do bookkeeping between suspend calls and
    their result. Promises are not thread safe, so we can't move them around
    AddRef-ed.
    - The stream destruction logic now takes into account that a stream can be
    destroyed while not being in mStreams.
    - A graph can now switch GraphDriver twice or more per iteration, for
    example if an author goes suspend()/resume()/suspend() in the same script.
    - Some operation have to be done on suspended stream, so we now use double
    for-loop around mSuspendedStreams and mStreams in some places in
    MediaStreamGraph.cpp.
    - A tricky part was making sure everything worked at AudioContext
    boundaries.  TrackUnionStream that have one of their input stream suspended
    append null ticks instead.
    - The graph ordering algorithm had to be altered to not include suspended
    streams.
    - There are some edge cases (adding a stream on a suspended graph, calling
    suspend/resume when a graph has just been close()d).
2015-02-27 18:22:05 +01:00
Paul Adenot
461144e598 Bug 1113925 - Don't return null in AudioContext.decodeAudioData. r=bz 2015-01-05 13:43:00 +01:00
Roshan Vidyashankar
2fcac00727 Bug 1057585 - Disable WebAudio APIs in prerendering; r=jst 2014-12-21 11:53:32 -05:00
Paul Adenot
83b0b389e5 Bug 1100349 - Implement StereoPannerNode. r=ehsan,smaug 2014-11-19 18:15:13 +01:00
Andrea Marchesini
0d64e9fcce Bug 1073615 - One MediaStreamGraph singleton per audioChannel, r=roc 2014-11-17 16:07:55 +00:00
Paul Adenot
1647bcb8b5 Bug 1000264 - Make AudioContext.decodeAudioData return a promise. r=ehsan,bz 2014-10-23 12:07:48 +02:00
Ryan VanderMeulen
4b2ccd0aba Backed out changesets 0c9407b0e481, c2c37b2e9fac, and 488700194519 (bug 1000264) for e10s test failures.
CLOSED TREE
2014-11-13 12:40:15 -05:00
Paul Adenot
14267887db Bug 1000264 - Make AudioContext.decodeAudioData return a promise. r=ehsan,bz 2014-10-23 12:07:48 +02:00
Ryan VanderMeulen
a10304e934 Backed out changeset 5a476e673470 (bug 1073615) for causing various intermittent failures. 2014-11-12 11:52:30 -05:00
Andrea Marchesini
ac6deeb508 Bug 1073615 - One MediaStreamGraph singleton per audioChannel. r=roc 2014-09-29 03:43:00 -04:00
Ryan VanderMeulen
48e5613377 Backed out changeset 11f95edf23a4 (bug 1073615) for frequent mochitest-bc timeouts. 2014-10-01 13:04:02 -04:00
Andrea Marchesini
9a17db815b Bug 1073615 - One MediaStreamGraph singleton per audioChannel, r=roc 2014-09-30 18:35:32 +01:00
Andrea Marchesini
c7dc85ded9 Bug 1046582 - mochitest for AudioChannel changes in MediaStream objects, r=ehsan, r=bz 2014-08-03 14:46:17 +01:00
Andrea Marchesini
ef6f6423e6 Bug 1023175 - AudioContext should have attribute EventHandler onmozinterruptend/begin in the webIDL interface, r=ehsan, r=smaug 2014-06-13 07:06:14 +01:00
Star Cheng
1bfab25fab Bug 984498: add new a parameter(audiochannel type) to AudioContext API. r=roc 2014-04-18 14:06:23 +08:00
Ehsan Akhgari
c320258e68 Bug 999908 - Remove support for the Web Audio legacy prefs for AudioBufferSourceNode, AudioContext, and AudioParam; r=padenot 2014-04-23 08:56:42 -04:00
Ehsan Akhgari
8f7afb566a Bug 968479 - Remove the media.webaudio.enabled pref; r=roc 2014-02-06 08:36:46 -05:00
Andrea Marchesini
e9c4f64b7d Bug 925594 - WebIDL enum for AudioChannel in HTMLMediaElement, r=ehsan, r=khuey 2013-10-28 17:08:14 -07:00
Carsten "Tomcat" Book
d03aaa0033 Backed out changeset 5506e7033c85 (bug 925594) perma-orange mochitest test-failure on b2g-ics 2013-10-28 15:34:08 +01:00
Andrea Marchesini
8b33038d00 Bug 925594 - WebIDL enum for AudioChannel in HTMLMediaElement, r=ehsan, r=khuey 2013-10-28 03:45:10 -07:00
Peter Van der Beken
47437910ca Bug 922159 - Rename Creator WebIDL extended attribute to NewObject. r=bz. 2013-09-30 18:32:22 +02:00
Ed Morley
ce29633280 Backed out changeset 64a19bc0e198 (bug 922159) for compilation failures on a CLOSED TREE 2013-10-23 15:51:48 +01:00
Peter Van der Beken
1e3061c17d Bug 922159 - Rename Creator WebIDL extended attribute to NewObject. r=bz. 2013-09-30 18:32:22 +02:00
Andrea Marchesini
49bbb44bc5 Bug 924870 - AudioContext.mozAudioChannel attribute, r=ehsan 2013-10-11 13:55:47 +02:00
Ehsan Akhgari
6bce33b069 Bug 865253 - Part 1: Implement the DOM bindings for OscillatorNode; r=roc 2013-08-19 11:53:00 -07:00
Ehsan Akhgari
65ba1015c5 Bug 855568 - Implement MediaElementAudioSourceNode
X-Git-Commit-ID: 52f1fcdd561e8214e6820a3f2478d9e8b9623430
2013-07-25 15:01:49 +12:00
secretrobotron
c3f78cbd1b Bug 856361. Part 5: Implement MediaStreamAudioSourceNode. r=ehsan 2013-07-24 23:29:39 +12:00
Paul Adenot
6385b9148c Bug 883591 - Don't allow creating a MediaStreamDestinationNode on an OfflineAudioContext. r=ehsan 2013-07-18 11:57:38 +02:00