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

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

Issue 1865583002: Implement BaseAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 13 matching lines...) Expand all
24 24
25 #ifndef AnalyserNode_h 25 #ifndef AnalyserNode_h
26 #define AnalyserNode_h 26 #define AnalyserNode_h
27 27
28 #include "core/dom/DOMTypedArray.h" 28 #include "core/dom/DOMTypedArray.h"
29 #include "modules/webaudio/AudioBasicInspectorNode.h" 29 #include "modules/webaudio/AudioBasicInspectorNode.h"
30 #include "modules/webaudio/RealtimeAnalyser.h" 30 #include "modules/webaudio/RealtimeAnalyser.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class AbstractAudioContext; 34 class BaseAudioContext;
35 class ExceptionState; 35 class ExceptionState;
36 36
37 class AnalyserHandler final : public AudioBasicInspectorHandler { 37 class AnalyserHandler final : public AudioBasicInspectorHandler {
38 public: 38 public:
39 static PassRefPtr<AnalyserHandler> create(AudioNode&, float sampleRate); 39 static PassRefPtr<AnalyserHandler> create(AudioNode&, float sampleRate);
40 ~AnalyserHandler() override; 40 ~AnalyserHandler() override;
41 41
42 // AudioHandler 42 // AudioHandler
43 void process(size_t framesToProcess) override; 43 void process(size_t framesToProcess) override;
44 44
(...skipping 24 matching lines...) Expand all
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(BaseAudioContext&, float sampleRate);
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(BaseAudioContext&, float sampleRate);
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698