Commit Graph

33 Commits

Author SHA1 Message Date
Ehsan Akhgari
1a541f0ce4 Bug 915524 - Implement AudioBuffer.copyFromChannel and AudioBuffer.copyToChannel; r=roc 2013-09-17 07:30:32 -04:00
Nicholas Nethercote
d74157039d Bug 911020 - Introduce js/TypeDecls.h, which holds very commonly used type declarations from the JS engine. r=luke.
--HG--
extra : rebase_source : 008ef689989f93b46627b8be8608bdbc544ca3a2
2013-08-27 19:59:14 -07:00
Ehsan Akhgari
1bb70455b6 Bug 905409 - Minimize the Web Audio #includes; r=roc 2013-08-15 15:44:14 -04:00
Ehsan Akhgari
656f6a97ae Bug 891543 - Remove the version of AudioBuffer::GetChannelData that is unused; r=roc 2013-07-09 17:35:05 -04:00
Ehsan Akhgari
81c77fdc86 Bug 890543 - Make AudioBuffer not inherit from nsISupports; r=mccr8 2013-07-05 16:21:52 -04:00
Robert O'Callahan
92695d22a2 Bug 886618. Play nothing when one or more of the Float32Arrays of an AudioBuffer has been neutered. r=ehsan
--HG--
extra : rebase_source : 6778a5416142e247aa91ec29bbc50b049ecd6d90
2013-06-26 04:01:07 +12:00
Robert O'Callahan
813aa6a822 Bug 886618. Remove dead AudioBuffer code. r=ehsan
--HG--
extra : rebase_source : fcd30cacfbcd1a43f62e0c0ce7df2dd57c307366
2013-06-29 01:49:56 +12:00
Ryan VanderMeulen
7d936a039a Backed out 2 changesets (bug 886618, bug 886657) for frequent OSX 10.7 mochitest-1 failures.
Backed out changeset 9fd8b2adc693 (bug 886618)
Backed out changeset 376fe12f4de4 (bug 886657)
2013-06-25 15:24:11 -04:00
Robert O'Callahan
3c90eac266 Bug 886618. Play nothing when one or more of the Float32Arrays of an AudioBuffer has been neutered. r=ehsan
--HG--
extra : rebase_source : a254d45ed8222b7154a541ecfff63125541abf85
2013-06-26 04:01:07 +12:00
Jon Coppeard
c43484e0e2 Bug 877762 - GC: Post-barrier cycle collector participants - 7 Convert most JSObect to use Heap<T> (ex. XBL) r=bz 2013-06-18 11:00:38 +01:00
Ehsan Akhgari
7ea8b318c7 Bug 868485 - Part 1: Implement the mixToMono behavior for createBuffer; r=roc 2013-05-05 11:15:58 -04:00
Ehsan Akhgari
8e7457501a Bug 868776 - Fix rooting hazards in Web Audio code; r=till 2013-05-04 17:40:20 -04:00
Boris Zbarsky
f75142b01d Bug 864727 part 5. Make all the WrapObject methods take a handle for the scope object. r=ms2ger 2013-04-25 12:29:54 -04:00
Ehsan Akhgari
2666bbba26 Bug 864083 - Cleanup AudioBuffer::GetThreadSharedChannelsForRate; r=padenot 2013-04-22 08:12:45 -04:00
Ryan VanderMeulen
95d5080f59 Backed out changesets 3b8fdfefcf5e and ab61f99fb584 (bug 864083) for bustage on a CLOSED TREE. 2013-04-22 08:58:32 -04:00
Ehsan Akhgari
d7d8be9b4a Bug 864083 - Cleanup AudioBuffer::GetThreadSharedChannelsForRate; r=padenot 2013-04-22 08:12:45 -04:00
Ehsan Akhgari
51c4aebe76 Bug 834513 - Part 3: Implement ScriptProcessorNode; r=roc 2013-04-13 21:37:04 -04:00
Paul Adenot
59347270e4 Bug 852366 - Don't resample on the main thread. r=ehsan,roc 2013-03-18 20:54:32 -04:00
Ehsan Akhgari
b5c7a06c19 Backed out changeset 3ae03ecf8b5e (bug 852366) because of mochitest-1 crashes
Landed on a CLOSED TREE
2013-04-09 11:29:15 -04:00
Paul Adenot
bdddd513a1 Bug 852366 - Don't resample on the main thread. r=ehsan,roc 2013-03-18 20:54:32 -04:00
Ehsan Akhgari
8394a6f09e Bug 852838 - Make sure that trying to allocate an AudioBuffer with a very large number of channels does not cause an OOM crash; r=roc 2013-03-20 21:49:13 -04:00
Masatoshi Kimura
7693df618d Bug 848339 - Remove the vestigial boolean outparam from nsWrapperCache::WrapObject. r=bz 2013-03-12 08:03:47 +09:00
Robert O'Callahan
6d8b72a707 Bug 804387. Part 9: Update WebAudio implementation to integrate with AudioNodeStream. r=ehsan
This is a mega-patch that was too hard to disentangle. Here's what it does:
-- Create infrastructure around AudioNode::UpdateOutputEnded to detect
when a node can no longer produce any output. When that becomes true,
disconnect it from the AudioNode graph.
-- Have AudioNode implement JSBindingFinalized to use as input in
UpdateOutputEnded.
-- Give every AudioNode a MediaStream, and give every connection
a MediaInputPort.
-- Actually play the audio that reaches the AudioContext's destination node.
-- Force AudioContext to use the audio sample rate defined by MediaStreamGraph.
-- Fix AudioBufferSourceNode's start and stop methods to possibly throw and
take default 'when' parameters.
-- Create an AudioNodeStream for AudioBufferSourceNode and give it a
AudioBufferSourceNodeEngine that does what's needed. Set parameters for
this engine in the start() and stop() methods.
-- Create AudioBuffer::GetThreadSharedChannelsForRate, which is responsible
for stealing the contents of any JS array buffers, and bundling them up
into a thread-shared read-only buffer object which can be used as
part of an AudioChunk. This method will also be responsible for
resampling and caching as necessary.

--HG--
rename : content/media/MediaStreamGraph.cpp => content/media/MediaStreamGraphImpl.h
extra : rebase_source : 9fa0ec0efa304acd6513e427103d6339c78efa53
2013-02-05 12:07:25 +13:00
Ehsan Akhgari
598f705578 Backed out 14 changesets (bug 804387) because of Android M2 crashes
Backed out changeset 80e8530f06ea (bug 804387)
Backed out changeset 3de2271ad47f (bug 804387)
Backed out changeset 00f86870931c (bug 804837)
Backed out changeset 0e3f20927c50 (bug 804387)
Backed out changeset e6ef90038007 (bug 804387)
Backed out changeset 0ad6f67a95f9 (bug 804387)
Backed out changeset d0772aba503c (bug 804387)
Backed out changeset 5477b87ff03e (bug 804387)
Backed out changeset 1d7ec5adc49f (bug 804387)
Backed out changeset 11f4d740cd6c (bug 804387)
Backed out changeset e6254d8997ab (bug 804387)
Backed out changeset 372322f3264d (bug 804387)
Backed out changeset 53d5ed687612 (bug 804387)
Backed out changeset 000b88ac40a7 (bug 804387)
2013-02-05 01:29:28 -05:00
Robert O'Callahan
41a1e70799 Bug 804837. Part 9: Update WebAudio implementation to integrate with AudioNodeStream. r=ehsan
This is a mega-patch that was too hard to disentangle. Here's what it does:
-- Create infrastructure around AudioNode::UpdateOutputEnded to detect
when a node can no longer produce any output. When that becomes true,
disconnect it from the AudioNode graph.
-- Have AudioNode implement JSBindingFinalized to use as input in
UpdateOutputEnded.
-- Give every AudioNode a MediaStream, and give every connection
a MediaInputPort.
-- Actually play the audio that reaches the AudioContext's destination node.
-- Force AudioContext to use the audio sample rate defined by MediaStreamGraph.
-- Fix AudioBufferSourceNode's start and stop methods to possibly throw and
take default 'when' parameters.
-- Create an AudioNodeStream for AudioBufferSourceNode and give it a
AudioBufferSourceNodeEngine that does what's needed. Set parameters for
this engine in the start() and stop() methods.
-- Create AudioBuffer::GetThreadSharedChannelsForRate, which is responsible
for stealing the contents of any JS array buffers, and bundling them up
into a thread-shared read-only buffer object which can be used as
part of an AudioChunk. This method will also be responsible for
resampling and caching as necessary.
2013-02-05 12:07:25 +13:00
Ehsan Akhgari
c78c1b8384 Bug 792263 - Implement decodeAudioData; r=bzbarsky,cpearce,padenot 2013-02-01 17:13:23 -05:00
Ehsan Akhgari
aab1f242be Bug 834869 - AudioBuffer's Unlink method should drop js objects; r=mccr8
--HG--
extra : rebase_source : 3ee8bc593cdffff135a7094eacee7c5d34c70848
2013-01-25 16:21:22 -05:00
Steve Fink
d3f194fbfb Bug 828753 - jsid rooting, mostly in jsinfer.*. Also switch JSObject from struct to class. r=terrence 2012-12-31 12:40:21 -08:00
Steve Fink
cb8aecdd2a Backed out changeset fce4e0f8a553 (bug 828753) for breaking windows warnings-as-errors (stop adding JSObject forward decls, please!) 2013-01-18 13:20:21 -08:00
Steve Fink
fa3e8f224b Bug 828753 - jsid rooting, mostly in jsinfer.*. Also switch JSObject from struct to class. r=terrence
--HG--
extra : rebase_source : c8806b27677594925ad0e6b54c47af5cf17e1153
2012-12-31 12:40:21 -08:00
Ehsan Akhgari
0423e87304 Bug 813269 - Use double to represent time in Web Audio; r=bzbarsky 2012-11-19 15:52:29 -05:00
Ehsan Akhgari
a329381db8 Use #include guards in the web audio code, no bug 2012-10-30 17:39:38 -04:00
Ehsan Akhgari
5366306b68 Bug 793294 - Implement AudioBuffer; r=bzbarsky,smaug
This is the full implementation of the AudioBuffer object.  There are
two ways to create these objects from an audio context and this patch
implements only one of them.

The construction of the AudioBuffer object is a two step process: the
object should be created with operator new first, and then
InitializeBuffers should be called on it.  InitializeBuffers is
fallible, because it uses the JS API to create the underlying typed
arrays, but that's fine, since the length of the buffers comes from web
content, and we don't want to use infallible allocations for those
anyways.

We hold on to the JS objects from the C++ implementation, and trace
through all of those objects, so that a GC does not kill those object
without us knowing.

The buffer should be possible to manipulate from both C++ and JS, and
the C++ object probably needs to support a set of methods for the C++
callers at some point.
2012-09-25 17:58:50 -04:00