| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void DynamicsCompressorNode::reset() | 88 void DynamicsCompressorNode::reset() |
| 89 { | 89 { |
| 90 m_dynamicsCompressor->reset(); | 90 m_dynamicsCompressor->reset(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void DynamicsCompressorNode::initialize() | 93 void DynamicsCompressorNode::initialize() |
| 94 { | 94 { |
| 95 if (isInitialized()) | 95 if (isInitialized()) |
| 96 return; | 96 return; |
| 97 | 97 |
| 98 AudioNode::initialize(); | 98 AudioNode::initialize(); |
| 99 m_dynamicsCompressor = adoptPtr(new DynamicsCompressor(sampleRate(), default
NumberOfOutputChannels)); | 99 m_dynamicsCompressor = adoptPtr(new DynamicsCompressor(sampleRate(), default
NumberOfOutputChannels)); |
| 100 } | 100 } |
| 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 double DynamicsCompressorNode::tailTime() const | 111 double DynamicsCompressorNode::tailTime() const |
| 112 { | 112 { |
| 113 return m_dynamicsCompressor->tailTime(); | 113 return m_dynamicsCompressor->tailTime(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 double DynamicsCompressorNode::latencyTime() const | 116 double DynamicsCompressorNode::latencyTime() const |
| 117 { | 117 { |
| 118 return m_dynamicsCompressor->latencyTime(); | 118 return m_dynamicsCompressor->latencyTime(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 } // namespace WebCore | 121 } // namespace WebCore |
| 122 | 122 |
| 123 #endif // ENABLE(WEB_AUDIO) | 123 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |