| 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 // Predelay section. | 488 // Predelay section. |
| 489 for (unsigned i = 0; i < pre_delay_buffers_.size(); ++i) | 489 for (unsigned i = 0; i < pre_delay_buffers_.size(); ++i) |
| 490 pre_delay_buffers_[i]->Zero(); | 490 pre_delay_buffers_[i]->Zero(); |
| 491 | 491 |
| 492 pre_delay_read_index_ = 0; | 492 pre_delay_read_index_ = 0; |
| 493 pre_delay_write_index_ = kDefaultPreDelayFrames; | 493 pre_delay_write_index_ = kDefaultPreDelayFrames; |
| 494 | 494 |
| 495 max_attack_compression_diff_db_ = -1; // uninitialized state | 495 max_attack_compression_diff_db_ = -1; // uninitialized state |
| 496 } | 496 } |
| 497 | 497 |
| 498 double DynamicsCompressorKernel::TailTime() const { |
| 499 // The reduction value of the compressor is computed from the gain |
| 500 // using an exponential filter with a time constant of |
| 501 // |kMeteringReleaseTimeConstant|. We need to keep he compressor |
| 502 // running for some time after the inputs go away so that the |
| 503 // reduction value approaches 0. This is a tradeoff between how |
| 504 // long we keep the node alive and how close we approach the final |
| 505 // value. A value of 5 to 10 times the time constant is a |
| 506 // reasonable trade-off. |
| 507 return 5 * kMeteringReleaseTimeConstant; |
| 508 } |
| 509 |
| 498 } // namespace blink | 510 } // namespace blink |
| OLD | NEW |