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

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

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Add baseLatency and fix use of hardwareSampleRate. Created 4 years 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
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 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
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
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698