Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1055)

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioNode.h

Issue 2242573002: Don't delay setting of channelInterpretation and channelCountMode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix grammar in comment. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/AudioNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.h b/third_party/WebKit/Source/modules/webaudio/AudioNode.h
index 2c120125079cf5e5d3af57964750d38e0a0023d7..28f2cded3a7ecf2ac09396f0d0350da8e4e60087 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.h
@@ -212,11 +212,27 @@ public:
String channelInterpretation();
void setChannelInterpretation(const String&, ExceptionState&);
- ChannelCountMode internalChannelCountMode() const { return m_channelCountMode; }
- AudioBus::ChannelInterpretation internalChannelInterpretation() const { return m_channelInterpretation; }
-
- void updateChannelCountMode();
- void updateChannelInterpretation();
+ void setInternalChannelCountMode(ChannelCountMode newMode)
+ {
+ releaseStore(&m_channelCountMode, newMode);
+ }
+
+ ChannelCountMode internalChannelCountMode() const
+ {
+ return static_cast<ChannelCountMode>(
+ acquireLoad(&m_channelCountMode));
+ }
+
+ void setInternalChannelInterpretation(unsigned newValue)
+ {
+ releaseStore(&m_channelInterpretation, newValue);
+ }
+
+ AudioBus::ChannelInterpretation internalChannelInterpretation() const
+ {
+ return static_cast<AudioBus::ChannelInterpretation>(
+ acquireLoad(&m_channelInterpretation));
+ }
protected:
// Inputs and outputs must be created before the AudioHandler is
@@ -268,15 +284,13 @@ private:
protected:
unsigned m_channelCount;
- ChannelCountMode m_channelCountMode;
- AudioBus::ChannelInterpretation m_channelInterpretation;
- // The new channel count mode that will be used to set the actual mode in the pre or post
- // rendering phase.
- ChannelCountMode m_newChannelCountMode;
- // The new channel interpretation that will be used to set the actual
- // intepretation in the pre or post rendering phase.
- AudioBus::ChannelInterpretation m_newChannelInterpretation;
+private:
+ // These are private to force use of the setters and getters.
+
+ // The internal representation of the channel count mode and interpretation.
+ unsigned m_channelCountMode;
+ unsigned m_channelInterpretation;
};
class MODULES_EXPORT AudioNode : public EventTargetWithInlineData {
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698