-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConstantSourceNode.json
69 lines (69 loc) · 3.85 KB
/
ConstantSourceNode.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
"name": "ConstantSourceNode",
"description": "The ConstantSourceNode interface—part of the Web Audio API—represents an audio source (based upon AudioScheduledSourceNode) whose output is single unchanging value. This makes it useful for cases in which you need a constant value coming in from an audio source. in addition, it can be used like a constructible AudioParam by automating the value of its offset or by connecting another node to it; see Controlling multiple parameters with ConstantSourceNode.",
"members": [
{
"name": "ConstantSourceNode()",
"link": "/en-US/docs/Web/API/ConstantSourceNode/ConstantSourceNode",
"description": "Creates and returns a new ConstantSourceNode instance, optionally specifying an object which establishes initial values for the object\u0027s properties. You can also create a ConstantSourceNode whose properties are initialized to their default values by calling AudioContext.createConstantSource().",
"parameters": [
{
"name": "context",
"description": "An AudioContext representing the audio context you want the node to be associated with."
},
{
"name": "options",
"description": "A ConstantSourceOptions dictionary object defining the properties you want the ConstantSourceNode to have: offset: A read-only AudioParam specifying the constant value generated by the source. The default is 1.0. The normal range is -1.0 to 1.0, but the value can be anywhere in the range from -Infinity to +Infinity."
}
]
},
{
"name": "offset",
"link": "/en-US/docs/Web/API/ConstantSourceNode/offset",
"description": "An AudioParam which specifies the value that this source continuously outputs. The default value is 1.0."
},
{
"name": "onended",
"link": "/en-US/docs/Web/API/AudioScheduledSourceNode/onended",
"description": "Fired whenever the ConstantSourceNode data has stopped playing."
},
{
"name": "start()",
"link": "/en-US/docs/Web/API/AudioScheduledSourceNode/start",
"description": "Schedules a sound to playback at an exact time.",
"parameters": [
{
"name": "when Optional",
"description": "The time, in seconds, at which the sound should begin to play. This value is specified in the same time coordinate system as the AudioContext is using for its currentTime attribute. A value of 0 (or omitting the when parameter entirely) causes the sound to start playback immediately."
},
{
"name": "offset Optional",
"description": "A floating-point number indicating the offset, in seconds, into the audio buffer where playback should begin. If 0 is passed then the playback will start from the beginning."
},
{
"name": "duration Optional",
"description": "A floating-point number indicating the duration, in seconds, to be played. If no value is passed then the duration will be equal to the length of the audio buffer minus the offset value"
},
{
"name": "TypeError",
"description": "The value specified for when is negative."
}
]
},
{
"name": "stop()",
"link": "/en-US/docs/Web/API/AudioScheduledSourceNode/stop",
"description": "Schedules a sound to stop playback at an exact time.",
"parameters": [
{
"name": "when Optional",
"description": "The time, in seconds, at which the sound should stop playing. This value is specified in the same time coordinate system as the AudioContext is using for its currentTime attribute. Omitting this parameter, specifying a value of 0, or passing a negative value causes the sound to stop playback immediately."
},
{
"name": "TypeError",
"description": "The value specified for when is negative."
}
]
}
]
}