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

309 Коммитов

Автор SHA1 Сообщение Дата
Paul Adenot 7c49f38e2c Bug 901633 - Part 7 - Update AudioNodeExternalInputStream to use the new AudioChunk methods. r=karlt
--HG--
extra : rebase_source : 29fe9e5df5bb9a3521d65f7f56cfbc17480eeef0
2015-07-29 18:37:18 +02:00
Paul Adenot aec5b5430b Bug 901633 - Part 6 - Update DelayBuffer to use the new AudioChunk methods. r=karlt
--HG--
extra : rebase_source : cb40d64841ca96562e5988aa37a30f0134194faf
2015-07-30 11:27:26 +02:00
Paul Adenot 077db3cb37 Bug 901633 - Part 4 - Update AudioNodeStream to use new chunk methods. r=roc
--HG--
extra : rebase_source : 521914982fc0d0d7ff0ea94dd999d649f7e5f267
2015-07-29 18:36:47 +02:00
Paul Adenot 8eb4594e21 Bug 1190676 - Part 10 - Fix consumers: AudioDestinationNode. r=karlt
--HG--
extra : rebase_source : 6cbad24c90bb83b1ee44a299f8eadd8eabff53cf
2015-08-25 10:30:43 +02:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Karl Tomlinson 605cd07259 bug 1199561 delay offline buffer allocation until non-null input is received r=padenot
The avoids the allocation and copying altogether when the output buffer
is silent.

--HG--
extra : rebase_source : f225628dc9bb2ea0cd0ec414a2212e39da92405f
2015-08-24 19:34:15 +12:00
Karl Tomlinson b8ba84787a bug 1199560 finish offline audio context processing even when allocation fails r=padenot
ProcessBlock() needs to return aFinished = true at some point.

--HG--
extra : rebase_source : 941371af142472ddf25a380b57f5e6f2f2d3029f
2015-08-24 19:29:15 +12:00
Karl Tomlinson 5c88921fb1 bug 1199559 remove now unused SetRawChannelContents r=padenot
--HG--
extra : rebase_source : 55881334df6dd69a43922d9b3bd5cee3f5e5d34b
2015-08-25 11:46:30 +12:00
Karl Tomlinson 306e3b5c38 bug 1199559 write audioprocess input buffer in a format suitable for direct use by AudioBuffer r=padenot
saving copying.

This also avoids graph thread allocations when input is null.

--HG--
extra : rebase_source : f9d2d987076fd23ecf2ff37ab0008ef7eb50a278
2015-08-28 18:30:17 +12:00
Karl Tomlinson 604c7a838d bug 1199559 write decodeAudioData buffer in a format suitable for direct use by AudioBuffer r=padenot
saving a copy.

--HG--
extra : rebase_source : 8592e6c30c2e4ffec33bb844db8ad32c5135bf16
2015-08-28 11:15:39 +12:00
Karl Tomlinson d94d65b40b bug 1199559 write offline buffer in a format suitable for direct use by AudioBuffer r=padenot
saving a copy.

--HG--
extra : rebase_source : e3d477c46ca365f0d65b47355b5ecf42d81a056b
2015-08-27 21:32:41 +12:00
Karl Tomlinson 90d515b961 bug 1199559 add a factory method to accept generated buffer contents in a format suitable for direct use r=padenot
This API lets AudioBuffer generators avoid a copy.

Future modifications to AudioBuffer will remove the unnecessary initial
allocation and zeroing.

--HG--
extra : rebase_source : 50f4d4dd79b32111583748d0b83065a13b03d888
2015-08-28 18:30:49 +12:00
Karl Tomlinson 74c733393d bug 1199559 add a helper to fallibly allocate ThreadSharedFloatArrayBufferList with buffers r=padenot
--HG--
extra : rebase_source : f7d532fb2142624b0a3c3423c954a2e817d529ea
2015-08-27 20:35:43 +12:00
Karl Tomlinson c919923973 bug 1199559 permit writing to ThreadSharedFloatArrayBufferList when not shared r=padenot
Being able to write to the channel data in the buffer list saves the creator
from needing to manage its own pointers to the channel data.

--HG--
extra : rebase_source : 02b22b8b2dc2d640bec706433d7f921858fd8ef4
2015-08-25 08:41:14 +12:00
Karl Tomlinson 2385836d46 bug 1197028 re-use DelayNode output buffer r=padenot
--HG--
extra : rebase_source : 138c4be0b1a248104049e4980b2656ff819dbf92
2015-08-21 13:36:31 +12:00
Karl Tomlinson df8f7c8b48 bug 1197028 release shared buffers from downstream so that upstream can re-use r=padenot
--HG--
extra : rebase_source : fe7817e706633c0849b3bc7738b44911071f8615
2015-08-21 13:26:58 +12:00
Karl Tomlinson 2a2e08e57d bug 1196109 keep memory allocation for mixed input channel pointer array r=padenot
--HG--
extra : rebase_source : 002f4ba2d79e027911a47b7a956c02eef6a18332
2015-08-20 18:41:25 +12:00
Karl Tomlinson 46ff786925 bug 1197043 use flags to distinguish between external streams and events r=padenot
MediaStreamAudioDestinationNode does not need any main thread events because
mDOMStream provides GetCurrentTime to consumers.

MediaRecoder also does not use main thread current time.

--HG--
extra : rebase_source : e022dc12e8a0e67c70d4a617449e28e76288b57e
2015-08-13 16:13:34 +12:00
Karl Tomlinson 330a9459ea bug 1197043 move AudioNodeStream creation to stream class r=padenot
--HG--
extra : rebase_source : 2e399f5d59b057a0cca6a423481ac86f6fa2c507
2015-08-12 11:26:24 +12:00
Karl Tomlinson cd9d54d222 bug 1197043 remove unnecessary aSampleRate parameter for AudioNodeStream creation r=padenot
--HG--
extra : rebase_source : 63ba0bf5008a9acd0a268051cbcde43ba5bfad0a
2015-08-12 11:04:13 +12:00
Karl Tomlinson 0c9e5bbfe0 bug 1196111 don't keep AudioContext alive from AudioBuffer r=baku
AudioBuffers are often generated from OfflineAudioContext to be used in other
contexts, when the OfflineAudioContext is no longer required.

--HG--
extra : rebase_source : 4d163ba69164f813256478ed0870803421c1f6a5
2015-08-18 11:48:38 +12:00
Ehsan Akhgari f9752f535c Bug 1196361 - Remove the media.useAudioChannelService pref; r=baku
We need to rely on the audio channel service for all products now,
so supporting running without it seems pointless at this point.
2015-08-19 21:00:18 -04:00
Sebastian Hengst a133c6114b Backed out changesets 7610baf4a3ae, 6226b99f19bd, 157e41e32906, 60a3b1862f71 (bug 1195158). r=backout
Backed out changeset 7610baf4a3ae (bug 1195158)
Backed out changeset 6226b99f19bd (bug 1195158)
Backed out changeset 157e41e32906 (bug 1195158)
Backed out changeset 60a3b1862f71 (bug 1195158)
2015-08-18 10:52:09 +02:00
JW Wang b47fc2fd4d Bug 1195158. Part 4 - remove unused code. r=cpearce. 2015-08-18 11:12:39 +08:00
Ehsan Akhgari 5e993ab31c Bug 1195051 - Part 4: Fix a null pointer crash happening after the destination node gets CCed
Landed on a CLOSED TREE
2015-08-17 11:45:25 -04:00
Ehsan Akhgari bd4b9d61f6 Bug 1195051 - Part 2: Mute the destination node when the AudioContext is suspended, and unmute when resumed; r=padenot 2015-08-17 08:55:00 -04:00
Ehsan Akhgari 53b1ca8619 Bug 1195051 - Part 1: Do not unmute the destination node as soon as the AudioContext is constructed; r=padenot 2015-08-17 08:54:59 -04:00
Karl Tomlinson 795135daf2 test for bug 1191648
--HG--
extra : rebase_source : 3588805b7e34ac76ed6422c6703c25d1fcc220bc
2015-08-11 13:37:20 +12:00
JW Wang 3a7d265755 Bug 1193603. Part 2 - Fix miscalculation in converting micro seconds to seconds. r=jya. 2015-08-12 18:02:34 +08:00
Kyle Huey 76e3009ab8 Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Karl Tomlinson da9d3d3591 bug 916387 remove workarounds in tests r=padenot
Zero output channels are used on ScriptProcessorNodes to improve efficiency in
tests when output is not required.

--HG--
extra : rebase_source : f3ddee8031d772bdcedbd482d80d3259a095e0ea
2015-08-06 16:04:23 +12:00
Karl Tomlinson 3a15b165c6 bug 916387 keep ScriptProcessorNode alive after input is GCed r=padenot
--HG--
extra : rebase_source : a9f5d8f4c33845d1548c2daf53d7aced6d6e668b
2015-08-06 17:56:06 +12:00
Karl Tomlinson fda85fcc8b bug 916387 add a notification of garbage collected input node r=padenot
The effects of garbage collection must not be observable.  We can collect an
AudioNode if it is not going to cause any further changes, but we must keep
any current effects.

--HG--
extra : rebase_source : f7ce500de2afd4f6cdff79c30c99a0ee8e74ab40
2015-08-06 14:15:40 +12:00
Karl Tomlinson 487efc8f27 bug 1191649 determine ScriptProcessor connected status on main thread r=padenot
because stream inputs may be removed when only providing null data.

The ScriptProcessor is also kept alive when it has only input nodes so that it
is not garbage collected when its input nodes are collected.

--HG--
extra : rebase_source : ee70db1b3e13b212107e048620880b929c662ad6
2015-08-06 16:22:56 +12:00
Karl Tomlinson e35277a491 bug 1191649 add notification of input node changes r=padenot
--HG--
extra : rebase_source : 71b101935ef10b5fa01008234897c0bb2c6979ba
2015-08-06 19:25:53 +12:00
Karl Tomlinson b78f6f2712 bug 1191648 don't create audioprocess event when there is no listener r=padenot
Creating the event added a reference to the ScriptProcessorNode, which wasn't
released until the AudioProcessingEvent was destroyed in
nsCycleCollector::FreeSnowWhite().

If another event is dispatched before cycle collection considers the
ScriptProcessorNode, then the node will not be collected.

Also, the reference count of the ScriptProcessorNode is no longer toggled
because this seemed to interfere with the cycle collection process.

--HG--
extra : rebase_source : 41878e716fe3fcc8f46f518be2a50d050b8ed14c
2015-08-10 12:51:37 +12:00
Karl Tomlinson d03299a57a bug 1191648 don't keep ScriptProcessorNode alive when it has no audioprocess listener r=padenot
--HG--
extra : rebase_source : 49b8c338a3cd645a67937a7584cba666512b31b6
2015-08-06 19:28:10 +12:00
Ehsan Akhgari f22dea9a72 Bug 1190040 - Part 2: Teach the audio channel service how to not notify audio-playback, and do that when a media element has no audio track; r=padenot 2015-08-06 10:26:27 -04:00
Aryeh Gregor 2311382621 Bug 1191305 - Alphabetize some includes; r=froydnj 2015-08-06 15:45:21 +03:00
Aryeh Gregor 80ea0a3e53 Bug 1190823 - Move OwningNonNull.h to xpcom/base/; r=froydnj
--HG--
rename : dom/bindings/OwningNonNull.h => xpcom/base/OwningNonNull.h
2015-08-05 15:28:27 +03:00
Karl Tomlinson 0f7fc2c09c bug 1184801 Test output of AnalyserNode with GainNode
--HG--
extra : rebase_source : 2158db1151e6b4dd3c862635c1bec4e0498a9135
2015-07-28 11:03:31 +12:00
Karl Tomlinson d149f45532 bug 1189168 avoid main thread assertion accessing mNode in SizeOfIncludingThis() r=padenot
because the main thread is blocked during the call.

--HG--
extra : rebase_source : 5ab42bd4d8a14e66e34781456ad11c6b48dc6227
2015-07-31 12:49:07 +12:00
Nicholas Nethercote 1059c1de13 Bug 1189156 (part 2) - Don't use enumeration style for nsTHashtable::SizeOf{In,Ex}cludingThis(). r=erahm.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

And we still have the existing single-arg SizeOf{In,Ex}cluding() functions,
which work if the entry type itself defines SizeOfExcludingThis().

--HG--
extra : rebase_source : f93de9b789c21b1b148bed9de795f663f77c9dd9
2015-07-29 01:50:52 -07:00
Jan-Ivar Bruaroey 0ccb51ddc8 Bug 1175523 - Update most (but not all) tests to use elem.srcObject over .mozSrcObject. r=pehrsons
--HG--
extra : rebase_source : bac0027f4bf5d75b8730c44a10141c114002633b
2015-07-14 10:12:31 -04:00
Karl Tomlinson 66f210c5b0 bug 1188704 remove now unused PerformInverseFFT() variation r=rillian
--HG--
extra : rebase_source : 13b3cfce3054fce463d0e2407bd48e343952830e
2015-07-30 12:51:48 +12:00
Karl Tomlinson a4757ceda3 bug 1188704 use existing FFTBlock arrays instead of allocating and copying and scaling r=rillian
It is now no longer necessary to clear zero bins because these are zeroed
in the FFTBlock constructor.

nsTArray bounds assertions now apply.

--HG--
extra : rebase_source : 18c07ecb51f9cb3c199536fe59110093db2295d4
2015-08-03 09:28:32 +12:00
Karl Tomlinson e8e61ee28e bug 1188704 add accessor functions for setting frequency components for inverse FFT r=rillian
--HG--
extra : rebase_source : cfd4b300d5437793dc60f4e0630fa393cc234b9d
2015-07-30 12:33:04 +12:00
Karl Tomlinson 6ca6918802 bug 1188704 combine scaling with copying r=rillian
--HG--
extra : rebase_source : f30aed44b66cca842a752a207ab9536e3cb395b2
2015-07-28 15:58:06 +12:00
Karl Tomlinson 893dc9cca8 bug 1188704 simplify culling of partials r=rillian
avoiding copying and scaling components that will be zeroed.

--HG--
extra : rebase_source : a649e78254296945d89f5e03dc75e6af753e56b4
2015-07-28 08:37:21 +12:00
Karl Tomlinson a4daa97373 bug 1188704 limit number of Fourier coefficients used to halfSize earlier r=rillian
realP[halfSize] was always set to zero because numberOfPartials < halfSize + 1
was always true.

--HG--
extra : rebase_source : 819b04a56032d810231a16fa0dd139cf82ef8ddf
2015-07-30 10:08:15 +12:00