| 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 16 matching lines...) Expand all Loading... |
| 27 #include "bindings/core/v8/ExceptionMessages.h" | 27 #include "bindings/core/v8/ExceptionMessages.h" |
| 28 #include "bindings/core/v8/ExceptionState.h" | 28 #include "bindings/core/v8/ExceptionState.h" |
| 29 #include "core/dom/ExceptionCode.h" | 29 #include "core/dom/ExceptionCode.h" |
| 30 #include "modules/webaudio/AnalyserOptions.h" | 30 #include "modules/webaudio/AnalyserOptions.h" |
| 31 #include "modules/webaudio/AudioNodeInput.h" | 31 #include "modules/webaudio/AudioNodeInput.h" |
| 32 #include "modules/webaudio/AudioNodeOutput.h" | 32 #include "modules/webaudio/AudioNodeOutput.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 AnalyserHandler::AnalyserHandler(AudioNode& node, float sample_rate) | 36 AnalyserHandler::AnalyserHandler(AudioNode& node, float sample_rate) |
| 37 : AudioBasicInspectorHandler(kNodeTypeAnalyser, node, sample_rate, 2) { | 37 : AudioBasicInspectorHandler(kNodeTypeAnalyser, node, sample_rate, 1) { |
| 38 channel_count_ = 1; |
| 38 Initialize(); | 39 Initialize(); |
| 39 } | 40 } |
| 40 | 41 |
| 41 PassRefPtr<AnalyserHandler> AnalyserHandler::Create(AudioNode& node, | 42 PassRefPtr<AnalyserHandler> AnalyserHandler::Create(AudioNode& node, |
| 42 float sample_rate) { | 43 float sample_rate) { |
| 43 return AdoptRef(new AnalyserHandler(node, sample_rate)); | 44 return AdoptRef(new AnalyserHandler(node, sample_rate)); |
| 44 } | 45 } |
| 45 | 46 |
| 46 AnalyserHandler::~AnalyserHandler() { | 47 AnalyserHandler::~AnalyserHandler() { |
| 47 Uninitialize(); | 48 Uninitialize(); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 275 |
| 275 void AnalyserNode::getFloatTimeDomainData(NotShared<DOMFloat32Array> array) { | 276 void AnalyserNode::getFloatTimeDomainData(NotShared<DOMFloat32Array> array) { |
| 276 GetAnalyserHandler().GetFloatTimeDomainData(array.View()); | 277 GetAnalyserHandler().GetFloatTimeDomainData(array.View()); |
| 277 } | 278 } |
| 278 | 279 |
| 279 void AnalyserNode::getByteTimeDomainData(NotShared<DOMUint8Array> array) { | 280 void AnalyserNode::getByteTimeDomainData(NotShared<DOMUint8Array> array) { |
| 280 GetAnalyserHandler().GetByteTimeDomainData(array.View()); | 281 GetAnalyserHandler().GetByteTimeDomainData(array.View()); |
| 281 } | 282 } |
| 282 | 283 |
| 283 } // namespace blink | 284 } // namespace blink |
| OLD | NEW |