| Index: third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.h
|
| diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.h b/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..701d6f0cb1488a115f9f2535e870cd8e145d09c4
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.h
|
| @@ -0,0 +1,43 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef AudioWorkletProcessor_h
|
| +#define AudioWorkletProcessor_h
|
| +
|
| +#include "bindings/core/v8/ScopedPersistent.h"
|
| +#include "platform/heap/Handle.h"
|
| +#include "v8/include/v8.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class AudioBuffer;
|
| +class AudioWorkletProcessorDefinition;
|
| +
|
| +// AudioWorkletProcessor class represents the active instance created from
|
| +// AudioWorkletProcessorDefinition. |AudioWorkletNodeHandler| invokes
|
| +// process() method in this object upon graph rendering.
|
| +//
|
| +// This is constructed and destroyed on a worker thread, and all methods also
|
| +// must be called on the worker thread.
|
| +class AudioWorkletProcessor
|
| + : public GarbageCollectedFinalized<AudioWorkletProcessor> {
|
| + public:
|
| + static AudioWorkletProcessor* create(AudioWorkletProcessorDefinition*);
|
| + virtual ~AudioWorkletProcessor();
|
| +
|
| + // TODO(hongchan): This method is simplified for prototyping purpose.
|
| + bool process(AudioBuffer* inputBuffer, AudioBuffer* outputBuffer);
|
| +
|
| + DECLARE_TRACE();
|
| +
|
| + private:
|
| + explicit AudioWorkletProcessor(AudioWorkletProcessorDefinition*);
|
| +
|
| + Member<AudioWorkletProcessorDefinition> m_definition;
|
| + ScopedPersistent<v8::Object> m_instance;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // AudioWorkletProcessor_h
|
|
|