From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/scriptprocessornode/index.html | 147 ++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 files/ja/web/api/scriptprocessornode/index.html (limited to 'files/ja/web/api/scriptprocessornode/index.html') diff --git a/files/ja/web/api/scriptprocessornode/index.html b/files/ja/web/api/scriptprocessornode/index.html new file mode 100644 index 0000000000..bfe620d750 --- /dev/null +++ b/files/ja/web/api/scriptprocessornode/index.html @@ -0,0 +1,147 @@ +--- +title: ScriptProcessorNode +slug: Web/API/ScriptProcessorNode +translation_of: Web/API/ScriptProcessorNode +--- +

{{APIRef("Web Audio API")}}

+ +
+

Note: 2014/8/29のWeb Audio API仕様公開にて、本機能は廃止対象となりAudio Workersの機能によって置き換えられる予定です.

+
+ +
+

The ScriptProcessorNode interface allows the generation, processing, or analyzing of audio using JavaScript. It is an {{domxref("AudioNode")}} audio-processing module that is linked to two buffers, one containing the input audio data, one containing the processed output audio data. An event, implementing the {{domxref("AudioProcessingEvent")}} interface, is sent to the object each time the input buffer contains new data, and the event handler terminates when it has filled the output buffer with data.

+
+ +

The ScriptProcessorNode stores the input in a buffer, send the audioprocess event. The EventHandler takes the input buffer and fill the output buffer which is sent to the output by the ScriptProcessorNode.

+ +

The size of the input and output buffer are defined at the creation time, when the {{domxref("AudioContext.createScriptProcessor()")}} method is called (both are defined by {{domxref("AudioContext.createScriptProcessor()")}}'s bufferSize parameter). The buffer size must be a power of 2 between 256 and 16384, that is 256, 512, 1024, 2048, 4096, 8192 or 16384. Small numbers lower the latency, but large number may be necessary to avoid audio breakup and glitches.

+ +

If the buffer size is not defined, which is recommended, the browser will pick one that its heuristic deems appropriate.

+ + + + + + + + + + + + + + + + + + + + + + + + +
Number of inputs1
Number of outputs1
Channel count mode"max"
Channel count2 (not used in the default count mode)
Channel interpretation"speakers"
+ +

Properties

+ +

Inherits properties from its parent, {{domxref("AudioNode")}}.

+ +
+
{{domxref("ScriptProcessorNode.bufferSize")}} {{readonlyInline}}
+
Returns an integer representing both the input and output buffer size. Its value can be a power of 2 value in the range 25616384.
+
+ +

Event handlers

+ +
+
{{domxref("ScriptProcessorNode.onaudioprocess")}}
+
Represents the {{domxref("EventHandler")}} to be called.
+
+ +

Methods

+ +

No specific methods; inherits methods from its parent, {{domxref("AudioNode")}}.

+ +

Example

+ +

{{page("/en-US/docs/Web/API/AudioContext.createScriptProcessor","Example")}}

+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Web Audio API', '#the-scriptprocessornode-interface---deprecated', 'ScriptProcessorNode')}}{{Spec2('Web Audio API')}} 
+ +

Browser compatibility

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support14 {{property_prefix("webkit")}}{{CompatGeckoDesktop(25)}}{{CompatNo}}15 {{property_prefix("webkit")}}
+ 22 (unprefixed)
6 {{property_prefix("webkit")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChromeFirefox Mobile (Gecko)Firefox OSIE PhoneOpera MobileSafari Mobile
Basic support{{CompatNo}}28 {{property_prefix("webkit")}}{{CompatGeckoMobile(25)}}1.2{{CompatNo}}{{CompatNo}}6 {{property_prefix("webkit")}}
+
+ +

See also

+ + -- cgit v1.2.3-54-g00ecf