Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| 11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
| 12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
| 13 * | 13 * |
| 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND | 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND |
| 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 17 * ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE | 17 * ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE |
| 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 20 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | 20 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 21 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 21 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
| 24 * DAMAGE. | 24 * DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 enum AudioContextLatencyCategory { | |
| 28 "balanced", | |
| 29 "interactive", | |
| 30 "playback" | |
| 31 }; | |
| 32 | |
| 27 // See https://webaudio.github.io/web-audio-api/#AudioContext | 33 // See https://webaudio.github.io/web-audio-api/#AudioContext |
| 28 [ | 34 [ |
| 29 ActiveScriptWrappable, | 35 ActiveScriptWrappable, |
| 30 Constructor, | 36 Constructor(optional AudioContextOptions contextOptions), |
| 31 ConstructorCallWith=Document, | 37 ConstructorCallWith=Document, |
| 32 DependentLifetime, | 38 DependentLifetime, |
| 33 NoInterfaceObject, | 39 NoInterfaceObject, |
| 34 RaisesException=Constructor, | 40 RaisesException=Constructor, |
| 35 ] interface AudioContext : BaseAudioContext { | 41 ] interface AudioContext : BaseAudioContext { |
| 36 [MeasureAs=AudioContextSuspend, CallWith=ScriptState, ImplementedAs=suspendC ontext] Promise<void> suspend(); | 42 [MeasureAs=AudioContextSuspend, CallWith=ScriptState, ImplementedAs=suspendC ontext] Promise<void> suspend(); |
| 37 [MeasureAs=AudioContextClose, CallWith=ScriptState, ImplementedAs=closeConte xt] Promise<void> close(); | 43 [MeasureAs=AudioContextClose, CallWith=ScriptState, ImplementedAs=closeConte xt] Promise<void> close(); |
| 38 | 44 |
| 45 // Number of seconds of processing latency incurred by the AudioContext pass ing the audio from the AudioDestinationNode to the audio subsystem | |
|
hongchan
2016/12/02 17:40:12
nit: please wrap the comment by 80 cols.
Andrew MacPherson
2016/12/05 14:12:53
Done.
| |
| 46 readonly attribute double baseLatency; | |
| 47 | |
| 39 // Sources | 48 // Sources |
| 40 // TODO(rtoy): The following methods should be here instead of in BaseAudioC ontext: | 49 // TODO(rtoy): The following methods should be here instead of in BaseAudioC ontext: |
| 41 // | 50 // |
| 42 // createMediaElementSource(HTMLMediaElement mediaElement) | 51 // createMediaElementSource(HTMLMediaElement mediaElement) |
| 43 // createMediaStreamSource(MediaStream mediaStream) | 52 // createMediaStreamSource(MediaStream mediaStream) |
| 44 // createMediaStreamDestination() | 53 // createMediaStreamDestination() |
| 45 }; | 54 }; |
| OLD | NEW |