BaseAudioContext: createConstantSource() method

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

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

The **createConstantSource()** property of the {{domxref("BaseAudioContext")}} interface creates a {{domxref("ConstantSourceNode")}} object, which is an audio source that continuously outputs a monaural (one-channel) sound signal whose samples all have the same value.

توجه: The {{domxref("ConstantSourceNode.ConstantSourceNode", "ConstantSourceNode()")}} constructor is the recommended way to create a {{domxref("ConstantSourceNode")}}; see Creating an AudioNode.

Syntax

js-nolint
createConstantSource()

Parameters

None.

Return value

A {{domxref('ConstantSourceNode')}} instance.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}