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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 void AnalyserNode::setSmoothingTimeConstant(double smoothingTime, | 256 void AnalyserNode::setSmoothingTimeConstant(double smoothingTime, |
257 ExceptionState& exceptionState) { | 257 ExceptionState& exceptionState) { |
258 analyserHandler().setSmoothingTimeConstant(smoothingTime, exceptionState); | 258 analyserHandler().setSmoothingTimeConstant(smoothingTime, exceptionState); |
259 } | 259 } |
260 | 260 |
261 double AnalyserNode::smoothingTimeConstant() const { | 261 double AnalyserNode::smoothingTimeConstant() const { |
262 return analyserHandler().smoothingTimeConstant(); | 262 return analyserHandler().smoothingTimeConstant(); |
263 } | 263 } |
264 | 264 |
265 void AnalyserNode::getFloatFrequencyData(DOMFloat32Array* array) { | 265 void AnalyserNode::getFloatFrequencyData( |
266 analyserHandler().getFloatFrequencyData(array, context()->currentTime()); | 266 const MaybeShared<DOMFloat32Array>& array) { |
| 267 // TODO(binji): Throw exception? |
| 268 if (array.isShared()) { |
| 269 analyserHandler().getFloatFrequencyData(array.viewNotShared(), |
| 270 context()->currentTime()); |
| 271 } |
267 } | 272 } |
268 | 273 |
269 void AnalyserNode::getByteFrequencyData(DOMUint8Array* array) { | 274 void AnalyserNode::getByteFrequencyData( |
270 analyserHandler().getByteFrequencyData(array, context()->currentTime()); | 275 const MaybeShared<DOMUint8Array>& array) { |
| 276 // TODO(binji): Throw exception? |
| 277 if (array.isShared()) { |
| 278 analyserHandler().getByteFrequencyData(array.viewNotShared(), |
| 279 context()->currentTime()); |
| 280 } |
271 } | 281 } |
272 | 282 |
273 void AnalyserNode::getFloatTimeDomainData(DOMFloat32Array* array) { | 283 void AnalyserNode::getFloatTimeDomainData( |
274 analyserHandler().getFloatTimeDomainData(array); | 284 const MaybeShared<DOMFloat32Array>& array) { |
| 285 // TODO(binji): Throw exception? |
| 286 if (array.isShared()) { |
| 287 analyserHandler().getFloatTimeDomainData(array.viewNotShared()); |
| 288 } |
275 } | 289 } |
276 | 290 |
277 void AnalyserNode::getByteTimeDomainData(DOMUint8Array* array) { | 291 void AnalyserNode::getByteTimeDomainData( |
278 analyserHandler().getByteTimeDomainData(array); | 292 const MaybeShared<DOMUint8Array>& array) { |
| 293 // TODO(binji): Throw exception? |
| 294 if (array.isShared()) { |
| 295 analyserHandler().getByteTimeDomainData(array.viewNotShared()); |
| 296 } |
279 } | 297 } |
280 | 298 |
281 } // namespace blink | 299 } // namespace blink |
OLD | NEW |