| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 AudioParamHandler& ratio, | 48 AudioParamHandler& ratio, |
| 49 AudioParamHandler& attack, | 49 AudioParamHandler& attack, |
| 50 AudioParamHandler& release); | 50 AudioParamHandler& release); |
| 51 | 51 |
| 52 ~DynamicsCompressorHandler(); | 52 ~DynamicsCompressorHandler(); |
| 53 | 53 |
| 54 // AudioHandler | 54 // AudioHandler |
| 55 void Process(size_t frames_to_process) override; | 55 void Process(size_t frames_to_process) override; |
| 56 void ProcessOnlyAudioParams(size_t frames_to_process) override; | 56 void ProcessOnlyAudioParams(size_t frames_to_process) override; |
| 57 void Initialize() override; | 57 void Initialize() override; |
| 58 void ClearInternalStateWhenDisabled() override; | |
| 59 | 58 |
| 60 float ReductionValue() const { return reduction_; } | 59 float ReductionValue() const { return reduction_; } |
| 61 | 60 |
| 62 private: | 61 private: |
| 63 DynamicsCompressorHandler(AudioNode&, | 62 DynamicsCompressorHandler(AudioNode&, |
| 64 float sample_rate, | 63 float sample_rate, |
| 65 AudioParamHandler& threshold, | 64 AudioParamHandler& threshold, |
| 66 AudioParamHandler& knee, | 65 AudioParamHandler& knee, |
| 67 AudioParamHandler& ratio, | 66 AudioParamHandler& ratio, |
| 68 AudioParamHandler& attack, | 67 AudioParamHandler& attack, |
| 69 AudioParamHandler& release); | 68 AudioParamHandler& release); |
| 69 bool RequiresTailProcessing() const override; |
| 70 double TailTime() const override; | 70 double TailTime() const override; |
| 71 double LatencyTime() const override; | 71 double LatencyTime() const override; |
| 72 | 72 |
| 73 std::unique_ptr<DynamicsCompressor> dynamics_compressor_; | 73 std::unique_ptr<DynamicsCompressor> dynamics_compressor_; |
| 74 RefPtr<AudioParamHandler> threshold_; | 74 RefPtr<AudioParamHandler> threshold_; |
| 75 RefPtr<AudioParamHandler> knee_; | 75 RefPtr<AudioParamHandler> knee_; |
| 76 RefPtr<AudioParamHandler> ratio_; | 76 RefPtr<AudioParamHandler> ratio_; |
| 77 float reduction_; | 77 float reduction_; |
| 78 RefPtr<AudioParamHandler> attack_; | 78 RefPtr<AudioParamHandler> attack_; |
| 79 RefPtr<AudioParamHandler> release_; | 79 RefPtr<AudioParamHandler> release_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 107 Member<AudioParam> ratio_; | 107 Member<AudioParam> ratio_; |
| 108 Member<AudioParam> attack_; | 108 Member<AudioParam> attack_; |
| 109 Member<AudioParam> release_; | 109 Member<AudioParam> release_; |
| 110 | 110 |
| 111 FRIEND_TEST_ALL_PREFIXES(DynamicsCompressorNodeTest, ProcessorLifetime); | 111 FRIEND_TEST_ALL_PREFIXES(DynamicsCompressorNodeTest, ProcessorLifetime); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace blink | 114 } // namespace blink |
| 115 | 115 |
| 116 #endif // DynamicsCompressorNode_h | 116 #endif // DynamicsCompressorNode_h |
| OLD | NEW |