Chromium Code Reviews| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |