| 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 17 matching lines...) Expand all Loading... |
| 28 #include "base/gtest_prod_util.h" | 28 #include "base/gtest_prod_util.h" |
| 29 #include "modules/ModulesExport.h" | 29 #include "modules/ModulesExport.h" |
| 30 #include "modules/webaudio/AudioNode.h" | 30 #include "modules/webaudio/AudioNode.h" |
| 31 #include "modules/webaudio/AudioParam.h" | 31 #include "modules/webaudio/AudioParam.h" |
| 32 #include <memory> | 32 #include <memory> |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class BaseAudioContext; | 36 class BaseAudioContext; |
| 37 class DynamicsCompressor; | 37 class DynamicsCompressor; |
| 38 class DynamicsCompressorOptions; |
| 38 | 39 |
| 39 class MODULES_EXPORT DynamicsCompressorHandler final : public AudioHandler { | 40 class MODULES_EXPORT DynamicsCompressorHandler final : public AudioHandler { |
| 40 public: | 41 public: |
| 41 static PassRefPtr<DynamicsCompressorHandler> create( | 42 static PassRefPtr<DynamicsCompressorHandler> create( |
| 42 AudioNode&, | 43 AudioNode&, |
| 43 float sampleRate, | 44 float sampleRate, |
| 44 AudioParamHandler& threshold, | 45 AudioParamHandler& threshold, |
| 45 AudioParamHandler& knee, | 46 AudioParamHandler& knee, |
| 46 AudioParamHandler& ratio, | 47 AudioParamHandler& ratio, |
| 47 AudioParamHandler& attack, | 48 AudioParamHandler& attack, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 75 RefPtr<AudioParamHandler> m_attack; | 76 RefPtr<AudioParamHandler> m_attack; |
| 76 RefPtr<AudioParamHandler> m_release; | 77 RefPtr<AudioParamHandler> m_release; |
| 77 | 78 |
| 78 FRIEND_TEST_ALL_PREFIXES(DynamicsCompressorNodeTest, ProcessorLifetime); | 79 FRIEND_TEST_ALL_PREFIXES(DynamicsCompressorNodeTest, ProcessorLifetime); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 class MODULES_EXPORT DynamicsCompressorNode final : public AudioNode { | 82 class MODULES_EXPORT DynamicsCompressorNode final : public AudioNode { |
| 82 DEFINE_WRAPPERTYPEINFO(); | 83 DEFINE_WRAPPERTYPEINFO(); |
| 83 public: | 84 public: |
| 84 static DynamicsCompressorNode* create(BaseAudioContext&, ExceptionState&); | 85 static DynamicsCompressorNode* create(BaseAudioContext&, ExceptionState&); |
| 86 static DynamicsCompressorNode* create(BaseAudioContext*, const DynamicsCompr
essorOptions&, ExceptionState&); |
| 85 DECLARE_VIRTUAL_TRACE(); | 87 DECLARE_VIRTUAL_TRACE(); |
| 86 | 88 |
| 87 AudioParam* threshold() const; | 89 AudioParam* threshold() const; |
| 88 AudioParam* knee() const; | 90 AudioParam* knee() const; |
| 89 AudioParam* ratio() const; | 91 AudioParam* ratio() const; |
| 90 float reduction() const; | 92 float reduction() const; |
| 91 AudioParam* attack() const; | 93 AudioParam* attack() const; |
| 92 AudioParam* release() const; | 94 AudioParam* release() const; |
| 93 | 95 |
| 94 private: | 96 private: |
| 95 DynamicsCompressorNode(BaseAudioContext&); | 97 DynamicsCompressorNode(BaseAudioContext&); |
| 96 DynamicsCompressorHandler& dynamicsCompressorHandler() const; | 98 DynamicsCompressorHandler& dynamicsCompressorHandler() const; |
| 97 | 99 |
| 98 Member<AudioParam> m_threshold; | 100 Member<AudioParam> m_threshold; |
| 99 Member<AudioParam> m_knee; | 101 Member<AudioParam> m_knee; |
| 100 Member<AudioParam> m_ratio; | 102 Member<AudioParam> m_ratio; |
| 101 Member<AudioParam> m_attack; | 103 Member<AudioParam> m_attack; |
| 102 Member<AudioParam> m_release; | 104 Member<AudioParam> m_release; |
| 103 | 105 |
| 104 FRIEND_TEST_ALL_PREFIXES(DynamicsCompressorNodeTest, ProcessorLifetime); | 106 FRIEND_TEST_ALL_PREFIXES(DynamicsCompressorNodeTest, ProcessorLifetime); |
| 105 }; | 107 }; |
| 106 | 108 |
| 107 } // namespace blink | 109 } // namespace blink |
| 108 | 110 |
| 109 #endif // DynamicsCompressorNode_h | 111 #endif // DynamicsCompressorNode_h |
| OLD | NEW |