mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 849916 - Part 2: Add helper functions for sending different argument types to the AudioNodeStream; r=padenot
This commit is contained in:
parent
1fc3470bd9
commit
b17f67da6a
@ -175,6 +175,30 @@ AudioNode::Connect(AudioNode& aDestination, uint32_t aOutput,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
AudioNode::SendDoubleParameterToStream(uint32_t aIndex, double aValue)
|
||||||
|
{
|
||||||
|
AudioNodeStream* ns = static_cast<AudioNodeStream*>(mStream.get());
|
||||||
|
MOZ_ASSERT(ns, "How come we don't have a stream here?");
|
||||||
|
ns->SetDoubleParameter(aIndex, aValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
AudioNode::SendInt32ParameterToStream(uint32_t aIndex, int32_t aValue)
|
||||||
|
{
|
||||||
|
AudioNodeStream* ns = static_cast<AudioNodeStream*>(mStream.get());
|
||||||
|
MOZ_ASSERT(ns, "How come we don't have a stream here?");
|
||||||
|
ns->SetInt32Parameter(aIndex, aValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
AudioNode::SendThreeDPointParameterToStream(uint32_t aIndex, const ThreeDPoint& aValue)
|
||||||
|
{
|
||||||
|
AudioNodeStream* ns = static_cast<AudioNodeStream*>(mStream.get());
|
||||||
|
MOZ_ASSERT(ns, "How come we don't have a stream here?");
|
||||||
|
ns->SetThreeDPointParameter(aIndex, aValue);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioNode::Disconnect(uint32_t aOutput, ErrorResult& aRv)
|
AudioNode::Disconnect(uint32_t aOutput, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
|
@ -23,6 +23,8 @@ class ErrorResult;
|
|||||||
|
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
|
struct ThreeDPoint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The DOM object representing a Web Audio AudioNode.
|
* The DOM object representing a Web Audio AudioNode.
|
||||||
*
|
*
|
||||||
@ -135,6 +137,11 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
static void Callback(AudioNode* aNode) { /* not implemented */ }
|
static void Callback(AudioNode* aNode) { /* not implemented */ }
|
||||||
|
|
||||||
|
// Helpers for sending different value types to streams
|
||||||
|
void SendDoubleParameterToStream(uint32_t aIndex, double aValue);
|
||||||
|
void SendInt32ParameterToStream(uint32_t aIndex, int32_t aValue);
|
||||||
|
void SendThreeDPointParameterToStream(uint32_t aIndex, const ThreeDPoint& aValue);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
nsRefPtr<AudioContext> mContext;
|
nsRefPtr<AudioContext> mContext;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user