OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 private: | 58 private: |
59 ConvolverHandler(AudioNode&, float sampleRate); | 59 ConvolverHandler(AudioNode&, float sampleRate); |
60 double tailTime() const override; | 60 double tailTime() const override; |
61 double latencyTime() const override; | 61 double latencyTime() const override; |
62 | 62 |
63 std::unique_ptr<Reverb> m_reverb; | 63 std::unique_ptr<Reverb> m_reverb; |
64 // This Persistent doesn't make a reference cycle including the owner | 64 // This Persistent doesn't make a reference cycle including the owner |
65 // ConvolverNode. | 65 // ConvolverNode. |
66 Persistent<AudioBuffer> m_buffer; | 66 Persistent<AudioBuffer> m_buffer; |
67 | 67 |
68 // This synchronizes dynamic changes to the convolution impulse response with
process(). | 68 // This synchronizes dynamic changes to the convolution impulse response with |
| 69 // process(). |
69 mutable Mutex m_processLock; | 70 mutable Mutex m_processLock; |
70 | 71 |
71 // Normalize the impulse response or not. Must default to true. | 72 // Normalize the impulse response or not. Must default to true. |
72 bool m_normalize; | 73 bool m_normalize; |
73 | 74 |
74 FRIEND_TEST_ALL_PREFIXES(ConvolverNodeTest, ReverbLifetime); | 75 FRIEND_TEST_ALL_PREFIXES(ConvolverNodeTest, ReverbLifetime); |
75 }; | 76 }; |
76 | 77 |
77 class MODULES_EXPORT ConvolverNode final : public AudioNode { | 78 class MODULES_EXPORT ConvolverNode final : public AudioNode { |
78 DEFINE_WRAPPERTYPEINFO(); | 79 DEFINE_WRAPPERTYPEINFO(); |
(...skipping 12 matching lines...) Expand all Loading... |
91 private: | 92 private: |
92 ConvolverNode(BaseAudioContext&); | 93 ConvolverNode(BaseAudioContext&); |
93 ConvolverHandler& convolverHandler() const; | 94 ConvolverHandler& convolverHandler() const; |
94 | 95 |
95 FRIEND_TEST_ALL_PREFIXES(ConvolverNodeTest, ReverbLifetime); | 96 FRIEND_TEST_ALL_PREFIXES(ConvolverNodeTest, ReverbLifetime); |
96 }; | 97 }; |
97 | 98 |
98 } // namespace blink | 99 } // namespace blink |
99 | 100 |
100 #endif // ConvolverNode_h | 101 #endif // ConvolverNode_h |
OLD | NEW |