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

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

Issue 2866503002: Revert removal of AudioBufferCallback (Closed)
Patch Set: Add AudioBufferCallback.{h,idl} Created 3 years, 7 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
7 enum AudioContextState { 6 enum AudioContextState {
8 "suspended", 7 "suspended",
9 "running", 8 "running",
10 "closed" 9 "closed"
11 }; 10 };
12 11
13 callback DecodeErrorCallback = void (DOMException error);
14 callback DecodeSuccessCallback = void (AudioBuffer decodedData);
15
16 [ 12 [
17 ActiveScriptWrappable, 13 ActiveScriptWrappable,
18 DependentLifetime, 14 DependentLifetime,
19 ] interface BaseAudioContext : EventTarget { 15 ] interface BaseAudioContext : EventTarget {
20 // All rendered audio ultimately connects to destination, which represents t he audio hardware. 16 // All rendered audio ultimately connects to destination, which represents t he audio hardware.
21 readonly attribute AudioDestinationNode destination; 17 readonly attribute AudioDestinationNode destination;
22 18
23 // All scheduled times are relative to this time in seconds. 19 // All scheduled times are relative to this time in seconds.
24 readonly attribute double currentTime; 20 readonly attribute double currentTime;
25 21
26 // 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).
27 readonly attribute float sampleRate; 23 readonly attribute float sampleRate;
28 24
29 // All panning is relative to this listener. 25 // All panning is relative to this listener.
30 readonly attribute AudioListener listener; 26 readonly attribute AudioListener listener;
31 27
32 // Current state of the AudioContext 28 // Current state of the AudioContext
33 readonly attribute AudioContextState state; 29 readonly attribute AudioContextState state;
34 30
35 [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, u nsigned long numberOfFrames, float sampleRate); 31 [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, u nsigned long numberOfFrames, float sampleRate);
36 32
37 // Asynchronous audio file data decoding. 33 // Asynchronous audio file data decoding.
38 [RaisesException, MeasureAs=AudioContextDecodeAudioData, CallWith=ScriptStat e] Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData, optional DecodeSu ccessCallback successCallback, optional DecodeErrorCallback errorCallback); 34 [RaisesException, MeasureAs=AudioContextDecodeAudioData, CallWith=ScriptStat e] Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData, optional AudioBuf ferCallback successCallback, optional AudioBufferCallback errorCallback);
39 35
40 // Sources 36 // Sources
41 [RaisesException, MeasureAs=AudioContextCreateBufferSource] AudioBufferSourc eNode createBufferSource(); 37 [RaisesException, MeasureAs=AudioContextCreateBufferSource] AudioBufferSourc eNode createBufferSource();
42 [RaisesException, MeasureAs=AudioContextCreateConstantSource] ConstantSource Node createConstantSource(); 38 [RaisesException, MeasureAs=AudioContextCreateConstantSource] ConstantSource Node createConstantSource();
43 39
44 // Processing nodes 40 // Processing nodes
45 [RaisesException, MeasureAs=AudioContextCreateGain] GainNode createGain(); 41 [RaisesException, MeasureAs=AudioContextCreateGain] GainNode createGain();
46 [RaisesException, MeasureAs=AudioContextCreateDelay] DelayNode createDelay(o ptional double maxDelayTime); 42 [RaisesException, MeasureAs=AudioContextCreateDelay] DelayNode createDelay(o ptional double maxDelayTime);
47 [RaisesException, MeasureAs=AudioContextCreateBiquadFilter] BiquadFilterNode createBiquadFilter(); 43 [RaisesException, MeasureAs=AudioContextCreateBiquadFilter] BiquadFilterNode createBiquadFilter();
48 [RaisesException, MeasureAs=AudioContextCreateIIRFilter] IIRFilterNode creat eIIRFilter(sequence<double> feedForward, sequence<double> feedBack); 44 [RaisesException, MeasureAs=AudioContextCreateIIRFilter] IIRFilterNode creat eIIRFilter(sequence<double> feedForward, sequence<double> feedBack);
(...skipping 15 matching lines...) Expand all
64 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon text] Promise<void> resume(); 60 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon text] Promise<void> resume();
65 61
66 // TODO(rtoy): These really belong to the AudioContext, but we need them 62 // TODO(rtoy): These really belong to the AudioContext, but we need them
67 // here so we can use an offline audio context to test these. 63 // here so we can use an offline audio context to test these.
68 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); 64 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
69 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStream AudioSourceNode createMediaStreamSource(MediaStream mediaStream); 65 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStream AudioSourceNode createMediaStreamSource(MediaStream mediaStream);
70 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS treamAudioDestinationNode createMediaStreamDestination(); 66 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS treamAudioDestinationNode createMediaStreamDestination();
71 67
72 attribute EventHandler onstatechange; 68 attribute EventHandler onstatechange;
73 }; 69 };
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