| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 m_reduction = | 96 m_reduction = |
| 97 m_dynamicsCompressor->parameterValue(DynamicsCompressor::ParamReduction); | 97 m_dynamicsCompressor->parameterValue(DynamicsCompressor::ParamReduction); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void DynamicsCompressorHandler::initialize() { | 100 void DynamicsCompressorHandler::initialize() { |
| 101 if (isInitialized()) | 101 if (isInitialized()) |
| 102 return; | 102 return; |
| 103 | 103 |
| 104 AudioHandler::initialize(); | 104 AudioHandler::initialize(); |
| 105 m_dynamicsCompressor = wrapUnique( | 105 m_dynamicsCompressor = wrapUnique(new DynamicsCompressor( |
| 106 new DynamicsCompressor(sampleRate(), defaultNumberOfOutputChannels)); | 106 context()->sampleRate(), defaultNumberOfOutputChannels)); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void DynamicsCompressorHandler::clearInternalStateWhenDisabled() { | 109 void DynamicsCompressorHandler::clearInternalStateWhenDisabled() { |
| 110 m_reduction = 0; | 110 m_reduction = 0; |
| 111 } | 111 } |
| 112 | 112 |
| 113 double DynamicsCompressorHandler::tailTime() const { | 113 double DynamicsCompressorHandler::tailTime() const { |
| 114 return m_dynamicsCompressor->tailTime(); | 114 return m_dynamicsCompressor->tailTime(); |
| 115 } | 115 } |
| 116 | 116 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 AudioParam* DynamicsCompressorNode::attack() const { | 223 AudioParam* DynamicsCompressorNode::attack() const { |
| 224 return m_attack; | 224 return m_attack; |
| 225 } | 225 } |
| 226 | 226 |
| 227 AudioParam* DynamicsCompressorNode::release() const { | 227 AudioParam* DynamicsCompressorNode::release() const { |
| 228 return m_release; | 228 return m_release; |
| 229 } | 229 } |
| 230 | 230 |
| 231 } // namespace blink | 231 } // namespace blink |
| OLD | NEW |