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

Side by Side Diff: Source/modules/webaudio/DynamicsCompressorNode.cpp

Issue 645853010: Make reduction value of dynamics compressor zero when no sources are connected (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « Source/modules/webaudio/DynamicsCompressorNode.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 void DynamicsCompressorNode::uninitialize() 102 void DynamicsCompressorNode::uninitialize()
103 { 103 {
104 if (!isInitialized()) 104 if (!isInitialized())
105 return; 105 return;
106 106
107 m_dynamicsCompressor.clear(); 107 m_dynamicsCompressor.clear();
108 AudioNode::uninitialize(); 108 AudioNode::uninitialize();
109 } 109 }
110 110
111 void DynamicsCompressorNode::clearInternalStateWhenDisabled()
112 {
113 m_reduction->setValue(0);
114 }
115
111 double DynamicsCompressorNode::tailTime() const 116 double DynamicsCompressorNode::tailTime() const
112 { 117 {
113 return m_dynamicsCompressor->tailTime(); 118 return m_dynamicsCompressor->tailTime();
114 } 119 }
115 120
116 double DynamicsCompressorNode::latencyTime() const 121 double DynamicsCompressorNode::latencyTime() const
117 { 122 {
118 return m_dynamicsCompressor->latencyTime(); 123 return m_dynamicsCompressor->latencyTime();
119 } 124 }
120 125
121 void DynamicsCompressorNode::trace(Visitor* visitor) 126 void DynamicsCompressorNode::trace(Visitor* visitor)
122 { 127 {
123 visitor->trace(m_threshold); 128 visitor->trace(m_threshold);
124 visitor->trace(m_knee); 129 visitor->trace(m_knee);
125 visitor->trace(m_ratio); 130 visitor->trace(m_ratio);
126 visitor->trace(m_reduction); 131 visitor->trace(m_reduction);
127 visitor->trace(m_attack); 132 visitor->trace(m_attack);
128 visitor->trace(m_release); 133 visitor->trace(m_release);
129 AudioNode::trace(visitor); 134 AudioNode::trace(visitor);
130 } 135 }
131 136
132 } // namespace blink 137 } // namespace blink
133 138
134 #endif // ENABLE(WEB_AUDIO) 139 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/DynamicsCompressorNode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698