OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // See https://webaudio.github.io/web-audio-api/#BaseAudioContext | 5 // See https://webaudio.github.io/web-audio-api/#BaseAudioContext |
6 enum AudioContextState { | 6 enum AudioContextState { |
7 "suspended", | 7 "suspended", |
8 "running", | 8 "running", |
9 "closed" | 9 "closed" |
10 }; | 10 }; |
11 | 11 |
12 enum AudioContextLatencyCategory { | |
13 "balanced", | |
14 "interactive", | |
15 "playback" | |
16 }; | |
Raymond Toy
2016/11/15 18:16:17
I think this should be defined in AudioContext.idl
Andrew MacPherson
2016/11/16 10:58:29
You're right, this will be fixed in the next commi
| |
17 | |
12 [ | 18 [ |
13 ActiveScriptWrappable, | 19 ActiveScriptWrappable, |
14 DependentLifetime, | 20 DependentLifetime, |
15 ] interface BaseAudioContext : EventTarget { | 21 ] interface BaseAudioContext : EventTarget { |
16 // All rendered audio ultimately connects to destination, which represents t he audio hardware. | 22 // All rendered audio ultimately connects to destination, which represents t he audio hardware. |
17 readonly attribute AudioDestinationNode destination; | 23 readonly attribute AudioDestinationNode destination; |
18 | 24 |
19 // All scheduled times are relative to this time in seconds. | 25 // All scheduled times are relative to this time in seconds. |
20 readonly attribute double currentTime; | 26 readonly attribute double currentTime; |
21 | 27 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon text] Promise<void> resume(); | 66 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon text] Promise<void> resume(); |
61 | 67 |
62 // TODO(rtoy): These really belong to the AudioContext, but we need them | 68 // TODO(rtoy): These really belong to the AudioContext, but we need them |
63 // here so we can use an offline audio context to test these. | 69 // here so we can use an offline audio context to test these. |
64 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); | 70 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); |
65 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStream AudioSourceNode createMediaStreamSource(MediaStream mediaStream); | 71 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStream AudioSourceNode createMediaStreamSource(MediaStream mediaStream); |
66 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS treamAudioDestinationNode createMediaStreamDestination(); | 72 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS treamAudioDestinationNode createMediaStreamDestination(); |
67 | 73 |
68 attribute EventHandler onstatechange; | 74 attribute EventHandler onstatechange; |
69 }; | 75 }; |
OLD | NEW |