mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 856328 - Part 1: Refactor sending an AudioParamTimeline to the stream into an AudioNode helper; r=padenot
--HG-- extra : rebase_source : 8e2331ded7c35d1a6e9057c5be5ad31a959beed9
This commit is contained in:
parent
86ed2f4bb4
commit
94d6e8730d
@ -199,6 +199,15 @@ AudioNode::SendThreeDPointParameterToStream(uint32_t aIndex, const ThreeDPoint&
|
||||
ns->SetThreeDPointParameter(aIndex, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
AudioNode::SendTimelineParameterToStream(AudioNode* aNode, uint32_t aIndex,
|
||||
const AudioParamTimeline& aValue)
|
||||
{
|
||||
AudioNodeStream* ns = static_cast<AudioNodeStream*>(aNode->mStream.get());
|
||||
MOZ_ASSERT(ns, "How come we don't have a stream here?");
|
||||
ns->SetTimelineParameter(aIndex, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
AudioNode::Disconnect(uint32_t aOutput, ErrorResult& aRv)
|
||||
{
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsTArray.h"
|
||||
#include "AudioContext.h"
|
||||
#include "AudioParamTimeline.h"
|
||||
#include "MediaStreamGraph.h"
|
||||
|
||||
struct JSContext;
|
||||
@ -141,6 +142,8 @@ protected:
|
||||
void SendDoubleParameterToStream(uint32_t aIndex, double aValue);
|
||||
void SendInt32ParameterToStream(uint32_t aIndex, int32_t aValue);
|
||||
void SendThreeDPointParameterToStream(uint32_t aIndex, const ThreeDPoint& aValue);
|
||||
static void SendTimelineParameterToStream(AudioNode* aNode, uint32_t aIndex,
|
||||
const AudioParamTimeline& aValue);
|
||||
|
||||
private:
|
||||
nsRefPtr<AudioContext> mContext;
|
||||
|
@ -117,8 +117,7 @@ void
|
||||
GainNode::SendGainToStream(AudioNode* aNode)
|
||||
{
|
||||
GainNode* This = static_cast<GainNode*>(aNode);
|
||||
AudioNodeStream* ns = static_cast<AudioNodeStream*>(This->mStream.get());
|
||||
ns->SetTimelineParameter(GainNodeEngine::GAIN, *This->mGain);
|
||||
SendTimelineParameterToStream(This, GainNodeEngine::GAIN, *This->mGain);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user