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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 m_ratio->calculateSampleAccurateValues(values, framesToProcess); | 109 m_ratio->calculateSampleAccurateValues(values, framesToProcess); |
110 m_attack->calculateSampleAccurateValues(values, framesToProcess); | 110 m_attack->calculateSampleAccurateValues(values, framesToProcess); |
111 m_release->calculateSampleAccurateValues(values, framesToProcess); | 111 m_release->calculateSampleAccurateValues(values, framesToProcess); |
112 } | 112 } |
113 | 113 |
114 void DynamicsCompressorHandler::initialize() { | 114 void DynamicsCompressorHandler::initialize() { |
115 if (isInitialized()) | 115 if (isInitialized()) |
116 return; | 116 return; |
117 | 117 |
118 AudioHandler::initialize(); | 118 AudioHandler::initialize(); |
119 m_dynamicsCompressor = WTF::wrapUnique( | 119 m_dynamicsCompressor = WTF::wrapUnique(new DynamicsCompressor( |
120 new DynamicsCompressor(sampleRate(), defaultNumberOfOutputChannels)); | 120 context()->sampleRate(), defaultNumberOfOutputChannels)); |
121 } | 121 } |
122 | 122 |
123 void DynamicsCompressorHandler::clearInternalStateWhenDisabled() { | 123 void DynamicsCompressorHandler::clearInternalStateWhenDisabled() { |
124 m_reduction = 0; | 124 m_reduction = 0; |
125 } | 125 } |
126 | 126 |
127 double DynamicsCompressorHandler::tailTime() const { | 127 double DynamicsCompressorHandler::tailTime() const { |
128 return m_dynamicsCompressor->tailTime(); | 128 return m_dynamicsCompressor->tailTime(); |
129 } | 129 } |
130 | 130 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 236 |
237 AudioParam* DynamicsCompressorNode::attack() const { | 237 AudioParam* DynamicsCompressorNode::attack() const { |
238 return m_attack; | 238 return m_attack; |
239 } | 239 } |
240 | 240 |
241 AudioParam* DynamicsCompressorNode::release() const { | 241 AudioParam* DynamicsCompressorNode::release() const { |
242 return m_release; | 242 return m_release; |
243 } | 243 } |
244 | 244 |
245 } // namespace blink | 245 } // namespace blink |
OLD | NEW |