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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // We optionally keep track of a panner node which has a doppler shift that | 138 // We optionally keep track of a panner node which has a doppler shift that |
139 // is incorporated into the pitch rate. | 139 // is incorporated into the pitch rate. |
140 // This RefPtr is connection reference. We must call AudioHandler:: | 140 // This RefPtr is connection reference. We must call AudioHandler:: |
141 // makeConnection() after ref(), and call AudioHandler::breakConnection() | 141 // makeConnection() after ref(), and call AudioHandler::breakConnection() |
142 // before deref(). | 142 // before deref(). |
143 // TODO(tkent): This is always null because setPannerNode is never | 143 // TODO(tkent): This is always null because setPannerNode is never |
144 // called. If we revive setPannerNode, this should be a raw pointer and | 144 // called. If we revive setPannerNode, this should be a raw pointer and |
145 // AudioBufferSourceNode should have Member<PannerNode>. | 145 // AudioBufferSourceNode should have Member<PannerNode>. |
146 RefPtr<PannerHandler> m_pannerNode; | 146 RefPtr<PannerHandler> m_pannerNode; |
147 | 147 |
148 // This synchronizes process() with setBuffer() which can cause dynamic chan
nel count changes. | |
149 mutable Mutex m_processLock; | |
150 | |
151 // The minimum playbackRate value ever used for this source. This includes
any adjustments | 148 // The minimum playbackRate value ever used for this source. This includes
any adjustments |
152 // caused by doppler too. | 149 // caused by doppler too. |
153 double m_minPlaybackRate; | 150 double m_minPlaybackRate; |
154 }; | 151 }; |
155 | 152 |
156 class AudioBufferSourceNode final : public AudioScheduledSourceNode { | 153 class AudioBufferSourceNode final : public AudioScheduledSourceNode { |
157 DEFINE_WRAPPERTYPEINFO(); | 154 DEFINE_WRAPPERTYPEINFO(); |
158 public: | 155 public: |
159 static AudioBufferSourceNode* create(AbstractAudioContext&, float sampleRate
); | 156 static AudioBufferSourceNode* create(AbstractAudioContext&, float sampleRate
); |
160 DECLARE_VIRTUAL_TRACE(); | 157 DECLARE_VIRTUAL_TRACE(); |
(...skipping 18 matching lines...) Expand all Loading... |
179 private: | 176 private: |
180 AudioBufferSourceNode(AbstractAudioContext&, float sampleRate); | 177 AudioBufferSourceNode(AbstractAudioContext&, float sampleRate); |
181 | 178 |
182 Member<AudioParam> m_playbackRate; | 179 Member<AudioParam> m_playbackRate; |
183 Member<AudioParam> m_detune; | 180 Member<AudioParam> m_detune; |
184 }; | 181 }; |
185 | 182 |
186 } // namespace blink | 183 } // namespace blink |
187 | 184 |
188 #endif // AudioBufferSourceNode_h | 185 #endif // AudioBufferSourceNode_h |
OLD | NEW |