Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h

Issue 2842003003: Make AudioBufferSourceNode.buffer setter conforming (Closed)
Patch Set: Update expected result Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // The minimum playbackRate value ever used for this source. 173 // The minimum playbackRate value ever used for this source.
174 double min_playback_rate_; 174 double min_playback_rate_;
175 175
176 // |min_playback_rate_| may be updated by the audio thread 176 // |min_playback_rate_| may be updated by the audio thread
177 // while the main thread checks if the node is in a stoppable 177 // while the main thread checks if the node is in a stoppable
178 // state, hence access needs to be atomic. 178 // state, hence access needs to be atomic.
179 // 179 //
180 // TODO: when the codebase adopts std::atomic<>, use it for 180 // TODO: when the codebase adopts std::atomic<>, use it for
181 // |min_playback_rate_|. 181 // |min_playback_rate_|.
182 Mutex min_playback_rate_mutex_; 182 Mutex min_playback_rate_mutex_;
183
184 // True if the |buffer| attribute has ever been set to a non-null
185 // value. Defaults to false.
186 bool buffer_has_been_set_;
hongchan 2017/07/28 18:45:32 Add ` = false;` and remove the comment about the d
Raymond Toy 2017/07/28 19:16:55 The constructor needs to initialize other things,
183 }; 187 };
184 188
185 class AudioBufferSourceNode final : public AudioScheduledSourceNode { 189 class AudioBufferSourceNode final : public AudioScheduledSourceNode {
186 DEFINE_WRAPPERTYPEINFO(); 190 DEFINE_WRAPPERTYPEINFO();
187 191
188 public: 192 public:
189 static AudioBufferSourceNode* Create(BaseAudioContext&, ExceptionState&); 193 static AudioBufferSourceNode* Create(BaseAudioContext&, ExceptionState&);
190 static AudioBufferSourceNode* Create(BaseAudioContext*, 194 static AudioBufferSourceNode* Create(BaseAudioContext*,
191 AudioBufferSourceOptions&, 195 AudioBufferSourceOptions&,
192 ExceptionState&); 196 ExceptionState&);
(...skipping 22 matching lines...) Expand all
215 private: 219 private:
216 AudioBufferSourceNode(BaseAudioContext&); 220 AudioBufferSourceNode(BaseAudioContext&);
217 221
218 Member<AudioParam> playback_rate_; 222 Member<AudioParam> playback_rate_;
219 Member<AudioParam> detune_; 223 Member<AudioParam> detune_;
220 }; 224 };
221 225
222 } // namespace blink 226 } // namespace blink
223 227
224 #endif // AudioBufferSourceNode_h 228 #endif // AudioBufferSourceNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698