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

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

Issue 2727733002: Implement AudioWorkletProcessor interface (Closed)
Patch Set: Addressing feedback Created 3 years, 9 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef AudioWorkletProcessor_h
6 #define AudioWorkletProcessor_h
7
8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "platform/heap/Handle.h"
10 #include "v8/include/v8.h"
11
12 namespace blink {
13
14 class AudioBuffer;
15 class AudioWorkletProcessorDefinition;
16
17 // AudioWorkletProcessor class represents the active instance created from
18 // AudioWorkletProcessorDefinition. |AudioWorkletNodeHandler| invokes
19 // process() method in this object upon graph rendering.
20 //
21 // This is constructed and destroyed on a worker thread, and all methods also
22 // must be called on the worker thread.
23 class AudioWorkletProcessor
24 : public GarbageCollectedFinalized<AudioWorkletProcessor> {
25 public:
26 static AudioWorkletProcessor* create(AudioWorkletProcessorDefinition*);
27 virtual ~AudioWorkletProcessor();
28
29 // TODO(hongchan): This method is simplified for prototyping purpose.
30 bool process(AudioBuffer* inputBuffer, AudioBuffer* outputBuffer);
31
32 DECLARE_TRACE();
33
34 private:
35 explicit AudioWorkletProcessor(AudioWorkletProcessorDefinition*);
36
37 Member<AudioWorkletProcessorDefinition> m_definition;
38 ScopedPersistent<v8::Object> m_instance;
39 };
40
41 } // namespace blink
42
43 #endif // AudioWorkletProcessor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698