OLD | NEW |
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 Loading... |
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) |
OLD | NEW |