forked from mirrors/gecko-dev
Bug 1573541 - Fix assertion failure in PannerNode.h; r=karlt
This removes the call to SetThreeDPointParameter which is no longer necessary now that we're using AudioParams for position and orientation. Doing the conversion can cause an assertion failure when the AudioParams have a scheduled future value. Differential Revision: https://phabricator.services.mozilla.com/D42023 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
08f34bc7d6
commit
e6817b0e4d
7 changed files with 0 additions and 55 deletions
|
|
@ -74,9 +74,6 @@ class AudioListener final : public nsWrapperCache {
|
|||
|
||||
~AudioListener() = default;
|
||||
|
||||
void SendThreeDPointParameterToStream(uint32_t aIndex,
|
||||
const ThreeDPoint& aValue);
|
||||
|
||||
private:
|
||||
RefPtr<AudioContext> mContext;
|
||||
RefPtr<AudioListenerEngine> mEngine;
|
||||
|
|
|
|||
|
|
@ -283,12 +283,6 @@ void AudioNode::SendInt32ParameterToStream(uint32_t aIndex, int32_t aValue) {
|
|||
mStream->SetInt32Parameter(aIndex, aValue);
|
||||
}
|
||||
|
||||
void AudioNode::SendThreeDPointParameterToStream(uint32_t aIndex,
|
||||
const ThreeDPoint& aValue) {
|
||||
MOZ_ASSERT(mStream, "How come we don't have a stream here?");
|
||||
mStream->SetThreeDPointParameter(aIndex, aValue);
|
||||
}
|
||||
|
||||
void AudioNode::SendChannelMixingParametersToStream() {
|
||||
if (mStream) {
|
||||
mStream->SetChannelMixingParameters(mChannelCount, mChannelCountMode,
|
||||
|
|
|
|||
|
|
@ -236,8 +236,6 @@ class AudioNode : public DOMEventTargetHelper, public nsSupportsWeakReference {
|
|||
// 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);
|
||||
void SendChannelMixingParametersToStream();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -271,10 +271,6 @@ class AudioNodeEngine {
|
|||
dom::AudioTimelineEvent& aValue) {
|
||||
NS_ERROR("Invalid RecvTimelineEvent index");
|
||||
}
|
||||
virtual void SetThreeDPointParameter(uint32_t aIndex,
|
||||
const dom::ThreeDPoint& aValue) {
|
||||
NS_ERROR("Invalid SetThreeDPointParameter index");
|
||||
}
|
||||
virtual void SetBuffer(AudioChunk&& aBuffer) {
|
||||
NS_ERROR("SetBuffer called on engine that doesn't support it");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,24 +205,6 @@ void AudioNodeStream::SendTimelineEvent(uint32_t aIndex,
|
|||
GraphImpl()->AppendMessage(MakeUnique<Message>(this, aIndex, aEvent));
|
||||
}
|
||||
|
||||
void AudioNodeStream::SetThreeDPointParameter(uint32_t aIndex,
|
||||
const ThreeDPoint& aValue) {
|
||||
class Message final : public ControlMessage {
|
||||
public:
|
||||
Message(AudioNodeStream* aStream, uint32_t aIndex,
|
||||
const ThreeDPoint& aValue)
|
||||
: ControlMessage(aStream), mValue(aValue), mIndex(aIndex) {}
|
||||
void Run() override {
|
||||
static_cast<AudioNodeStream*>(mStream)->Engine()->SetThreeDPointParameter(
|
||||
mIndex, mValue);
|
||||
}
|
||||
ThreeDPoint mValue;
|
||||
uint32_t mIndex;
|
||||
};
|
||||
|
||||
GraphImpl()->AppendMessage(MakeUnique<Message>(this, aIndex, aValue));
|
||||
}
|
||||
|
||||
void AudioNodeStream::SetBuffer(AudioChunk&& aBuffer) {
|
||||
class Message final : public ControlMessage {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -144,23 +144,6 @@ class PannerNodeEngine final : public AudioNodeEngine {
|
|||
NS_ERROR("Bad PannerNodeEngine Int32Parameter");
|
||||
}
|
||||
}
|
||||
void SetThreeDPointParameter(uint32_t aIndex,
|
||||
const ThreeDPoint& aParam) override {
|
||||
switch (aIndex) {
|
||||
case PannerNode::POSITION:
|
||||
mPositionX.SetValue(aParam.x);
|
||||
mPositionY.SetValue(aParam.y);
|
||||
mPositionZ.SetValue(aParam.z);
|
||||
break;
|
||||
case PannerNode::ORIENTATION:
|
||||
mOrientationX.SetValue(aParam.x);
|
||||
mOrientationY.SetValue(aParam.y);
|
||||
mOrientationZ.SetValue(aParam.z);
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("Bad PannerNodeEngine ThreeDPointParameter");
|
||||
}
|
||||
}
|
||||
void SetDoubleParameter(uint32_t aIndex, double aParam) override {
|
||||
switch (aIndex) {
|
||||
case PannerNode::REF_DISTANCE:
|
||||
|
|
|
|||
|
|
@ -74,8 +74,6 @@ class PannerNode final : public AudioNode {
|
|||
mPositionX->SetValue(aX);
|
||||
mPositionY->SetValue(aY);
|
||||
mPositionZ->SetValue(aZ);
|
||||
SendThreeDPointParameterToStream(
|
||||
POSITION, ConvertAudioParamTo3DP(mPositionX, mPositionY, mPositionZ));
|
||||
}
|
||||
|
||||
void SetOrientation(double aX, double aY, double aZ) {
|
||||
|
|
@ -87,9 +85,6 @@ class PannerNode final : public AudioNode {
|
|||
mOrientationX->SetValue(aX);
|
||||
mOrientationY->SetValue(aY);
|
||||
mOrientationZ->SetValue(aZ);
|
||||
SendThreeDPointParameterToStream(
|
||||
ORIENTATION,
|
||||
ConvertAudioParamTo3DP(mOrientationX, mOrientationY, mOrientationZ));
|
||||
}
|
||||
|
||||
double RefDistance() const { return mRefDistance; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue