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

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

Issue 2839063003: Implement tail processing for AudioNodes (Closed)
Patch Set: Make declaration order consistent Created 3 years, 5 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
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 void DynamicsCompressorHandler::Initialize() { 115 void DynamicsCompressorHandler::Initialize() {
116 if (IsInitialized()) 116 if (IsInitialized())
117 return; 117 return;
118 118
119 AudioHandler::Initialize(); 119 AudioHandler::Initialize();
120 dynamics_compressor_ = WTF::WrapUnique(new DynamicsCompressor( 120 dynamics_compressor_ = WTF::WrapUnique(new DynamicsCompressor(
121 Context()->sampleRate(), defaultNumberOfOutputChannels)); 121 Context()->sampleRate(), defaultNumberOfOutputChannels));
122 } 122 }
123 123
124 void DynamicsCompressorHandler::ClearInternalStateWhenDisabled() { 124 bool DynamicsCompressorHandler::RequiresTailProcessing() const {
125 reduction_ = 0; 125 // Always return true even if the tail time and latency might both
126 // be zero.
127 return true;
126 } 128 }
127 129
128 double DynamicsCompressorHandler::TailTime() const { 130 double DynamicsCompressorHandler::TailTime() const {
129 return dynamics_compressor_->TailTime(); 131 return dynamics_compressor_->TailTime();
130 } 132 }
131 133
132 double DynamicsCompressorHandler::LatencyTime() const { 134 double DynamicsCompressorHandler::LatencyTime() const {
133 return dynamics_compressor_->LatencyTime(); 135 return dynamics_compressor_->LatencyTime();
134 } 136 }
135 137
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 234
233 AudioParam* DynamicsCompressorNode::attack() const { 235 AudioParam* DynamicsCompressorNode::attack() const {
234 return attack_; 236 return attack_;
235 } 237 }
236 238
237 AudioParam* DynamicsCompressorNode::release() const { 239 AudioParam* DynamicsCompressorNode::release() const {
238 return release_; 240 return release_;
239 } 241 }
240 242
241 } // namespace blink 243 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698