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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AnalyserNode.cpp

Issue 2760353002: Define default values for options dictionaries for WebAudio (Closed)
Patch Set: Rebase Created 3 years, 8 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 ExceptionState& exception_state) { 195 ExceptionState& exception_state) {
196 DCHECK(IsMainThread()); 196 DCHECK(IsMainThread());
197 197
198 AnalyserNode* node = Create(*context, exception_state); 198 AnalyserNode* node = Create(*context, exception_state);
199 199
200 if (!node) 200 if (!node)
201 return nullptr; 201 return nullptr;
202 202
203 node->HandleChannelOptions(options, exception_state); 203 node->HandleChannelOptions(options, exception_state);
204 204
205 if (options.hasFftSize()) 205 node->setFftSize(options.fftSize(), exception_state);
hongchan 2017/04/12 16:37:53 Not relevant to this CL, but why 'set..' not 'Set.
Raymond Toy 2017/04/12 18:10:12 Who knows? setFftSize didn't get changed by the Gr
206 node->setFftSize(options.fftSize(), exception_state); 206 node->setSmoothingTimeConstant(options.smoothingTimeConstant(),
207 207 exception_state);
208 if (options.hasSmoothingTimeConstant())
209 node->setSmoothingTimeConstant(options.smoothingTimeConstant(),
210 exception_state);
211 208
212 // minDecibels and maxDecibels have default values. Set both of the values 209 // minDecibels and maxDecibels have default values. Set both of the values
213 // at once. 210 // at once.
214 node->SetMinMaxDecibels(options.minDecibels(), options.maxDecibels(), 211 node->SetMinMaxDecibels(options.minDecibels(), options.maxDecibels(),
215 exception_state); 212 exception_state);
216 213
217 return node; 214 return node;
218 } 215 }
219 216
220 AnalyserHandler& AnalyserNode::GetAnalyserHandler() const { 217 AnalyserHandler& AnalyserNode::GetAnalyserHandler() const {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 272
276 void AnalyserNode::getFloatTimeDomainData(DOMFloat32Array* array) { 273 void AnalyserNode::getFloatTimeDomainData(DOMFloat32Array* array) {
277 GetAnalyserHandler().GetFloatTimeDomainData(array); 274 GetAnalyserHandler().GetFloatTimeDomainData(array);
278 } 275 }
279 276
280 void AnalyserNode::getByteTimeDomainData(DOMUint8Array* array) { 277 void AnalyserNode::getByteTimeDomainData(DOMUint8Array* array) {
281 GetAnalyserHandler().GetByteTimeDomainData(array); 278 GetAnalyserHandler().GetByteTimeDomainData(array);
282 } 279 }
283 280
284 } // namespace blink 281 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698