Closed
Bug 1476744
Opened 6 years ago
Closed 6 years ago
Pull values from the AudioListener when computing PannerNode values
Categories
(Core :: Web Audio, enhancement, P2)
Core
Web Audio
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: padenot, Assigned: padenot)
References
Details
Attachments
(1 file)
For now we're pushing them to all PannerNodes when calling the methods on the AudioListener, and pulling them from PannerNodes is more in line with how I'm going to do things in bug 1283029. I'm going with more or less the same design as our AudioNode/AudioNodeEngine here, it's really the same.
Assignee | ||
Updated•6 years ago
|
Summary: Pull values from the AudioListener when computing PannerNode Values → Pull values from the AudioListener when computing PannerNode values
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8993075 [details] Bug 1476744 - Pull values from the AudioListener when computing PannerNode values. https://reviewboard.mozilla.org/r/257892/#review264820 Code analysis found 5 defects in this patch: - 5 defects found by clang-tidy You can run this analysis locally with: - `./mach static-analysis check path/to/file.cpp` (C/C++) If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx ::: dom/media/webaudio/AudioListener.h:79 (Diff revision 1) > > private: > + void SendListenerEngineEvent(AudioListenerEngine::AudioListenerParameter aParameter, > + const ThreeDPoint& aValue); > + > ~AudioListener() {} Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default] ~AudioListener() {} ^ ~~ = default; ::: dom/media/webaudio/AudioListener.h:79 (Diff revision 1) > > private: > + void SendListenerEngineEvent(AudioListenerEngine::AudioListenerParameter aParameter, > + const ThreeDPoint& aValue); > + > ~AudioListener() {} Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default] ~AudioListener() {} ^ ~~ = default; ::: dom/media/webaudio/AudioListener.h:79 (Diff revision 1) > > private: > + void SendListenerEngineEvent(AudioListenerEngine::AudioListenerParameter aParameter, > + const ThreeDPoint& aValue); > + > ~AudioListener() {} Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default] ~AudioListener() {} ^ ~~ = default; ::: dom/media/webaudio/AudioListener.h:79 (Diff revision 1) > > private: > + void SendListenerEngineEvent(AudioListenerEngine::AudioListenerParameter aParameter, > + const ThreeDPoint& aValue); > + > ~AudioListener() {} Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default] ~AudioListener() {} ^ ~~ = default; ::: dom/media/webaudio/AudioListener.h:79 (Diff revision 1) > > private: > + void SendListenerEngineEvent(AudioListenerEngine::AudioListenerParameter aParameter, > + const ThreeDPoint& aValue); > + > ~AudioListener() {} Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default] ~AudioListener() {} ^ ~~ = default;
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → padenot
Comment hidden (mozreview-request) |
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8993075 [details] Bug 1476744 - Pull values from the AudioListener when computing PannerNode values. https://reviewboard.mozilla.org/r/257892/#review264916 This looks good, thanks, but I think this will be easier to review with AudioListener::RegisterPannerNode() and SendThreeDPointParameterToStream() removed in this patch. ::: dom/media/webaudio/AudioListener.cpp:126 (Diff revision 2) > + mPosition.y = aY; > + mPosition.z = aZ; > + SendListenerEngineEvent(AudioListenerEngine::AudioListenerParameter::POSITION, mPosition); > +} > + > +void AudioListener::SendListenerEngineEvent(AudioListenerEngine::AudioListenerParameter aParameter, const ThreeDPoint& aValue) 80 ::: dom/media/webaudio/AudioListener.cpp:148 (Diff revision 2) > + AudioListenerEngine* mEngine; > + AudioListenerEngine::AudioListenerParameter mParameter; > + ThreeDPoint mValue; > + }; > + > + mContext->DestinationStream()->GraphImpl()->AppendMessage(MakeUnique<Message>(mEngine.get(), aParameter, aValue)); 80 columns. ::: dom/media/webaudio/PannerNode.cpp:45 (Diff revision 2) > NS_IMPL_RELEASE_INHERITED(PannerNode, AudioNode) > > class PannerNodeEngine final : public AudioNodeEngine > { > public: > - explicit PannerNodeEngine(AudioNode* aNode, AudioDestinationNode* aDestination, AudioListener* aListener) > + explicit PannerNodeEngine(AudioNode* aNode, AudioDestinationNode* aDestination, const AudioListenerEngine* aListenerEngine) 80 columns ::: dom/media/webaudio/PannerNode.cpp:256 (Diff revision 2) > RefPtr<AudioNodeStream> mDestination; > // This member is set on the main thread, but is not accessed on the rendering > // thread untile mPanningModelFunction has changed, and this happens strictly > // later, via a MediaStreamGraph ControlMessage. > nsAutoPtr<HRTFPanner> mHRTFPanner; > - RefPtr<AudioListener> mListener; > + const AudioListenerEngine* mListenerEngine; Please document what keeps this alive long enough. ::: dom/media/webaudio/PannerNode.cpp:298 (Diff revision 2) > , mConeInnerAngle(360.) > , mConeOuterAngle(360.) > , mConeOuterGain(0.) > { > mStream = AudioNodeStream::Create(aContext, > - new PannerNodeEngine(this, aContext->Destination(), aContext->Listener()), > + new PannerNodeEngine(this, aContext->Destination(), aContext->Listener()->Engine()), 80 columns
Attachment #8993075 -
Flags: review?(karlt)
Comment hidden (mozreview-request) |
Comment 6•6 years ago
|
||
mozreview-review |
Comment on attachment 8993075 [details] Bug 1476744 - Pull values from the AudioListener when computing PannerNode values. https://reviewboard.mozilla.org/r/257892/#review265288 ::: dom/media/webaudio/AudioListener.h:35 (Diff revision 3) > + FRONT, > + RIGHT > + }; > + AudioListenerEngine(); > + void RecvListenerEngineEvent( > + AudioListenerEngine::AudioListenerParameter aParameter, I don't think AudioListenerEngine:: is required here. At least it is not with clang 5.0.2. ::: dom/media/webaudio/AudioListener.cpp:29 (Diff revision 3) > +{ > +} > + > +void > +AudioListenerEngine::RecvListenerEngineEvent( > + AudioListenerEngine::AudioListenerParameter aParameter, AudioListenerEngine:: not required. ::: dom/media/webaudio/PannerNode.h (Diff revision 3) > - LISTENER_FRONT_VECTOR, // unit length > - LISTENER_RIGHT_VECTOR, // unit length, orthogonal to LISTENER_FRONT_VECTOR Can you copy the comments to the new parameter definitions, please?
Attachment #8993075 -
Flags: review?(karlt) → review+
Comment hidden (mozreview-request) |
Pushed by paul@paul.cx: https://hg.mozilla.org/integration/autoland/rev/0ae34db4c34f Pull values from the AudioListener when computing PannerNode values. r=karlt
Comment 9•6 years ago
|
||
Backed out for failing android at tests/dom/media/test/crashtests/doppler-1.html Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=97d89ba5f93dad118fe54358ff70c28a3a33cde5 Failure logs: https://treeherder.mozilla.org/logviewer.html#?job_id=189187217&repo=autoland&lineNumber=2406 https://treeherder.mozilla.org/logviewer.html#?job_id=189191407&repo=autoland&lineNumber=4732 Backout: https://hg.mozilla.org/integration/autoland/rev/060df6ed6995bdba888551568560087805b902e4
Flags: needinfo?(padenot)
Updated•6 years ago
|
Rank: 19
Priority: -- → P2
Comment 10•6 years ago
|
||
Pushed by paul@paul.cx: https://hg.mozilla.org/integration/autoland/rev/11b4729e92ec Pull values from the AudioListener when computing PannerNode values. r=karlt
Comment 11•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/11b4729e92ec
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/12278 for changes under testing/web-platform/tests
Upstream PR was closed without merging
Upstream PR merged
You need to log in
before you can comment on or make changes to this bug.
Description
•