Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl

Issue 2820113006: Remove AudioBufferCallback (Closed)
Patch Set: Slightly reorder BaseAudioContext.idl Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
6 enum AudioContextState { 7 enum AudioContextState {
7 "suspended", 8 "suspended",
8 "running", 9 "running",
9 "closed" 10 "closed"
10 }; 11 };
11 12
13 callback DecodeErrorCallback = void (DOMException error);
14 callback DecodeSuccessCallback = void (AudioBuffer decodedData);
15
12 [ 16 [
13 ActiveScriptWrappable, 17 ActiveScriptWrappable,
14 DependentLifetime, 18 DependentLifetime,
15 ] interface BaseAudioContext : EventTarget { 19 ] interface BaseAudioContext : EventTarget {
16 // All rendered audio ultimately connects to destination, which represents t he audio hardware. 20 // All rendered audio ultimately connects to destination, which represents t he audio hardware.
17 readonly attribute AudioDestinationNode destination; 21 readonly attribute AudioDestinationNode destination;
18 22
19 // All scheduled times are relative to this time in seconds. 23 // All scheduled times are relative to this time in seconds.
20 readonly attribute double currentTime; 24 readonly attribute double currentTime;
21 25
22 // All AudioNodes in the context run at this sample-rate (sample-frames per second). 26 // All AudioNodes in the context run at this sample-rate (sample-frames per second).
23 readonly attribute float sampleRate; 27 readonly attribute float sampleRate;
24 28
25 // All panning is relative to this listener. 29 // All panning is relative to this listener.
26 readonly attribute AudioListener listener; 30 readonly attribute AudioListener listener;
27 31
28 // Current state of the AudioContext 32 // Current state of the AudioContext
29 readonly attribute AudioContextState state; 33 readonly attribute AudioContextState state;
30 34
31 [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, u nsigned long numberOfFrames, float sampleRate); 35 [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, u nsigned long numberOfFrames, float sampleRate);
32 36
33 // Asynchronous audio file data decoding. 37 // Asynchronous audio file data decoding.
34 [RaisesException, MeasureAs=AudioContextDecodeAudioData, CallWith=ScriptStat e] Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData, optional AudioBuf ferCallback successCallback, optional AudioBufferCallback errorCallback); 38 [RaisesException, MeasureAs=AudioContextDecodeAudioData, CallWith=ScriptStat e] Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData, optional DecodeSu ccessCallback successCallback, optional DecodeErrorCallback errorCallback);
35 39
36 // Sources 40 // Sources
37 [RaisesException, MeasureAs=AudioContextCreateBufferSource] AudioBufferSourc eNode createBufferSource(); 41 [RaisesException, MeasureAs=AudioContextCreateBufferSource] AudioBufferSourc eNode createBufferSource();
38 [RaisesException, MeasureAs=AudioContextCreateConstantSource] ConstantSource Node createConstantSource(); 42 [RaisesException, MeasureAs=AudioContextCreateConstantSource] ConstantSource Node createConstantSource();
39 43
40 // Processing nodes 44 // Processing nodes
41 [RaisesException, MeasureAs=AudioContextCreateGain] GainNode createGain(); 45 [RaisesException, MeasureAs=AudioContextCreateGain] GainNode createGain();
42 [RaisesException, MeasureAs=AudioContextCreateDelay] DelayNode createDelay(o ptional double maxDelayTime); 46 [RaisesException, MeasureAs=AudioContextCreateDelay] DelayNode createDelay(o ptional double maxDelayTime);
43 [RaisesException, MeasureAs=AudioContextCreateBiquadFilter] BiquadFilterNode createBiquadFilter(); 47 [RaisesException, MeasureAs=AudioContextCreateBiquadFilter] BiquadFilterNode createBiquadFilter();
44 [RaisesException, MeasureAs=AudioContextCreateIIRFilter] IIRFilterNode creat eIIRFilter(sequence<double> feedForward, sequence<double> feedBack); 48 [RaisesException, MeasureAs=AudioContextCreateIIRFilter] IIRFilterNode creat eIIRFilter(sequence<double> feedForward, sequence<double> feedBack);
(...skipping 15 matching lines...) Expand all
60 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon text] Promise<void> resume(); 64 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon text] Promise<void> resume();
61 65
62 // TODO(rtoy): These really belong to the AudioContext, but we need them 66 // 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. 67 // here so we can use an offline audio context to test these.
64 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); 68 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
65 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStream AudioSourceNode createMediaStreamSource(MediaStream mediaStream); 69 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStream AudioSourceNode createMediaStreamSource(MediaStream mediaStream);
66 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS treamAudioDestinationNode createMediaStreamDestination(); 70 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS treamAudioDestinationNode createMediaStreamDestination();
67 71
68 attribute EventHandler onstatechange; 72 attribute EventHandler onstatechange;
69 }; 73 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698