| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 AnalyserHandler(AudioNode&, float sampleRate); | 71 AnalyserHandler(AudioNode&, float sampleRate); |
| 72 | 72 |
| 73 RealtimeAnalyser m_analyser; | 73 RealtimeAnalyser m_analyser; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 class AnalyserNode final : public AudioBasicInspectorNode { | 76 class AnalyserNode final : public AudioBasicInspectorNode { |
| 77 DEFINE_WRAPPERTYPEINFO(); | 77 DEFINE_WRAPPERTYPEINFO(); |
| 78 public: | 78 public: |
| 79 static AnalyserNode* create(AbstractAudioContext&, float sampleRate); | 79 static AnalyserNode* create(AbstractAudioContext&, ExceptionState&); |
| 80 | 80 |
| 81 unsigned fftSize() const; | 81 unsigned fftSize() const; |
| 82 void setFftSize(unsigned size, ExceptionState&); | 82 void setFftSize(unsigned size, ExceptionState&); |
| 83 unsigned frequencyBinCount() const; | 83 unsigned frequencyBinCount() const; |
| 84 void setMinDecibels(double, ExceptionState&); | 84 void setMinDecibels(double, ExceptionState&); |
| 85 double minDecibels() const; | 85 double minDecibels() const; |
| 86 void setMaxDecibels(double, ExceptionState&); | 86 void setMaxDecibels(double, ExceptionState&); |
| 87 double maxDecibels() const; | 87 double maxDecibels() const; |
| 88 void setSmoothingTimeConstant(double, ExceptionState&); | 88 void setSmoothingTimeConstant(double, ExceptionState&); |
| 89 double smoothingTimeConstant() const; | 89 double smoothingTimeConstant() const; |
| 90 void getFloatFrequencyData(DOMFloat32Array*); | 90 void getFloatFrequencyData(DOMFloat32Array*); |
| 91 void getByteFrequencyData(DOMUint8Array*); | 91 void getByteFrequencyData(DOMUint8Array*); |
| 92 void getFloatTimeDomainData(DOMFloat32Array*); | 92 void getFloatTimeDomainData(DOMFloat32Array*); |
| 93 void getByteTimeDomainData(DOMUint8Array*); | 93 void getByteTimeDomainData(DOMUint8Array*); |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 AnalyserNode(AbstractAudioContext&, float sampleRate); | 96 AnalyserNode(AbstractAudioContext&); |
| 97 AnalyserHandler& analyserHandler() const; | 97 AnalyserHandler& analyserHandler() const; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace blink | 100 } // namespace blink |
| 101 | 101 |
| 102 #endif // AnalyserNode_h | 102 #endif // AnalyserNode_h |
| OLD | NEW |