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

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

Issue 2471353004: Implement AudioScheduledSourceNode (Closed)
Patch Set: Rebase Created 4 years 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ConstantSourceNode_h 5 #ifndef ConstantSourceNode_h
6 #define ConstantSourceNode_h 6 #define ConstantSourceNode_h
7 7
8 #include "modules/webaudio/AudioParam.h" 8 #include "modules/webaudio/AudioParam.h"
9 #include "modules/webaudio/AudioScheduledSourceNode.h" 9 #include "modules/webaudio/AudioScheduledSourceNode.h"
10 #include "platform/audio/AudioBus.h" 10 #include "platform/audio/AudioBus.h"
(...skipping 25 matching lines...) Expand all
36 AudioParamHandler& offset); 36 AudioParamHandler& offset);
37 37
38 // If we are no longer playing, propogate silence ahead to downstream nodes. 38 // If we are no longer playing, propogate silence ahead to downstream nodes.
39 bool propagatesSilence() const override; 39 bool propagatesSilence() const override;
40 40
41 RefPtr<AudioParamHandler> m_offset; 41 RefPtr<AudioParamHandler> m_offset;
42 AudioFloatArray m_sampleAccurateValues; 42 AudioFloatArray m_sampleAccurateValues;
43 }; 43 };
44 44
45 class ConstantSourceNode final : public AudioScheduledSourceNode { 45 class ConstantSourceNode final : public AudioScheduledSourceNode {
46 USING_GARBAGE_COLLECTED_MIXIN(ConstantSourceNode);
hongchan 2016/12/01 00:11:22 Just curious - so this only can be set up in the t
Raymond Toy 2016/12/01 18:48:32 Removed here and for OscillatorNode. I will have
46 DEFINE_WRAPPERTYPEINFO(); 47 DEFINE_WRAPPERTYPEINFO();
47 48
48 public: 49 public:
49 static ConstantSourceNode* create(BaseAudioContext&, ExceptionState&); 50 static ConstantSourceNode* create(BaseAudioContext&, ExceptionState&);
50 static ConstantSourceNode* create(BaseAudioContext*, 51 static ConstantSourceNode* create(BaseAudioContext*,
51 const ConstantSourceOptions&, 52 const ConstantSourceOptions&,
52 ExceptionState&); 53 ExceptionState&);
53 DECLARE_VIRTUAL_TRACE(); 54 DECLARE_VIRTUAL_TRACE();
54 55
55 AudioParam* offset(); 56 AudioParam* offset();
56 57
57 private: 58 private:
58 ConstantSourceNode(BaseAudioContext&); 59 ConstantSourceNode(BaseAudioContext&);
59 ConstantSourceHandler& constantSourceHandler() const; 60 ConstantSourceHandler& constantSourceHandler() const;
60 61
61 Member<AudioParam> m_offset; 62 Member<AudioParam> m_offset;
62 }; 63 };
63 64
64 } // namespace blink 65 } // namespace blink
65 66
66 #endif // ConstantSourceNode_h 67 #endif // ConstantSourceNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698