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 }; |
(...skipping 10 matching lines...) Expand all Loading... | |
21 | 21 |
22 // All AudioNodes in the context run at this sample-rate (sample-frames per second). | 22 // All AudioNodes in the context run at this sample-rate (sample-frames per second). |
23 readonly attribute float sampleRate; | 23 readonly attribute float sampleRate; |
24 | 24 |
25 // All panning is relative to this listener. | 25 // All panning is relative to this listener. |
26 readonly attribute AudioListener listener; | 26 readonly attribute AudioListener listener; |
27 | 27 |
28 // Current state of the AudioContext | 28 // Current state of the AudioContext |
29 readonly attribute AudioContextState state; | 29 readonly attribute AudioContextState state; |
30 | 30 |
31 // Number of seconds of processing latency incurred by the AudioContext pass ing the audio from the AudioDestinationNode to the audio subsystem | |
Raymond Toy
2016/11/30 21:50:27
I think this is a spec issue (for which I've filed
Andrew MacPherson
2016/12/01 12:11:56
Done, I've moved this to the AudioContext now.
| |
32 readonly attribute double baseLatency; | |
33 | |
31 [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, u nsigned long numberOfFrames, float sampleRate); | 34 [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, u nsigned long numberOfFrames, float sampleRate); |
32 | 35 |
33 // Asynchronous audio file data decoding. | 36 // Asynchronous audio file data decoding. |
34 [RaisesException, MeasureAs=AudioContextDecodeAudioData, CallWith=ScriptStat e] Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData, optional AudioBuf ferCallback successCallback, optional AudioBufferCallback errorCallback); | 37 [RaisesException, MeasureAs=AudioContextDecodeAudioData, CallWith=ScriptStat e] Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData, optional AudioBuf ferCallback successCallback, optional AudioBufferCallback errorCallback); |
35 | 38 |
36 // Sources | 39 // Sources |
37 [RaisesException, MeasureAs=AudioContextCreateBufferSource] AudioBufferSourc eNode createBufferSource(); | 40 [RaisesException, MeasureAs=AudioContextCreateBufferSource] AudioBufferSourc eNode createBufferSource(); |
38 [RaisesException, MeasureAs=AudioContextCreateConstantSource] ConstantSource Node createConstantSource(); | 41 [RaisesException, MeasureAs=AudioContextCreateConstantSource] ConstantSource Node createConstantSource(); |
39 | 42 |
40 // Processing nodes | 43 // Processing nodes |
(...skipping 19 matching lines...) Expand all Loading... | |
60 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon text] Promise<void> resume(); | 63 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon text] Promise<void> resume(); |
61 | 64 |
62 // TODO(rtoy): These really belong to the AudioContext, but we need them | 65 // 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. | 66 // here so we can use an offline audio context to test these. |
64 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); | 67 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); |
65 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStream AudioSourceNode createMediaStreamSource(MediaStream mediaStream); | 68 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStream AudioSourceNode createMediaStreamSource(MediaStream mediaStream); |
66 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS treamAudioDestinationNode createMediaStreamDestination(); | 69 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS treamAudioDestinationNode createMediaStreamDestination(); |
67 | 70 |
68 attribute EventHandler onstatechange; | 71 attribute EventHandler onstatechange; |
69 }; | 72 }; |
OLD | NEW |