| 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 // WebAudio spec: https://webaudio.github.io/web-audio-api/#BaseAudioContext | 5 // WebAudio spec: 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 [RaisesException, MeasureAs=AudioContextCreateAnalyser] AnalyserNode createA
nalyser(); | 49 [RaisesException, MeasureAs=AudioContextCreateAnalyser] AnalyserNode createA
nalyser(); |
| 50 [RaisesException, MeasureAs=AudioContextCreateScriptProcessor] ScriptProcess
orNode createScriptProcessor(optional unsigned long bufferSize, optional unsigne
d long numberOfInputChannels, optional unsigned long numberOfOutputChannels); | 50 [RaisesException, MeasureAs=AudioContextCreateScriptProcessor] ScriptProcess
orNode createScriptProcessor(optional unsigned long bufferSize, optional unsigne
d long numberOfInputChannels, optional unsigned long numberOfOutputChannels); |
| 51 [RaisesException, MeasureAs=AudioContextCreateStereoPanner] StereoPannerNode
createStereoPanner(); | 51 [RaisesException, MeasureAs=AudioContextCreateStereoPanner] StereoPannerNode
createStereoPanner(); |
| 52 [RaisesException, MeasureAs=AudioContextCreateOscillator] OscillatorNode cre
ateOscillator(); | 52 [RaisesException, MeasureAs=AudioContextCreateOscillator] OscillatorNode cre
ateOscillator(); |
| 53 [RaisesException, MeasureAs=AudioContextCreatePeriodicWave] PeriodicWave cre
atePeriodicWave(Float32Array real, Float32Array imag, optional PeriodicWaveConst
raints options); | 53 [RaisesException, MeasureAs=AudioContextCreatePeriodicWave] PeriodicWave cre
atePeriodicWave(Float32Array real, Float32Array imag, optional PeriodicWaveConst
raints options); |
| 54 | 54 |
| 55 // Channel splitting and merging | 55 // Channel splitting and merging |
| 56 [RaisesException, MeasureAs=AudioContextCreateChannelSplitter] ChannelSplitt
erNode createChannelSplitter(optional unsigned long numberOfOutputs); | 56 [RaisesException, MeasureAs=AudioContextCreateChannelSplitter] ChannelSplitt
erNode createChannelSplitter(optional unsigned long numberOfOutputs); |
| 57 [RaisesException, MeasureAs=AudioContextCreateChannelMerger] ChannelMergerNo
de createChannelMerger(optional unsigned long numberOfInputs); | 57 [RaisesException, MeasureAs=AudioContextCreateChannelMerger] ChannelMergerNo
de createChannelMerger(optional unsigned long numberOfInputs); |
| 58 | 58 |
| 59 // Close | |
| 60 [MeasureAs=AudioContextClose, CallWith=ScriptState, ImplementedAs=closeConte
xt] Promise<void> close(); | |
| 61 | |
| 62 // Pause/resume | 59 // Pause/resume |
| 63 [MeasureAs=AudioContextSuspend, CallWith=ScriptState, ImplementedAs=suspendC
ontext] Promise<void> suspend(); | 60 [MeasureAs=AudioContextSuspend, CallWith=ScriptState, ImplementedAs=suspendC
ontext] Promise<void> suspend(); |
| 64 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon
text] Promise<void> resume(); | 61 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon
text] Promise<void> resume(); |
| 65 | 62 |
| 66 // TODO(rtoy): These really belong to the AudioContext, but we need them | 63 // 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. | 64 // here so we can use an offline audio context to test these. |
| 68 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme
ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); | 65 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme
ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); |
| 69 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStream
AudioSourceNode createMediaStreamSource(MediaStream mediaStream); | 66 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStream
AudioSourceNode createMediaStreamSource(MediaStream mediaStream); |
| 70 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS
treamAudioDestinationNode createMediaStreamDestination(); | 67 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS
treamAudioDestinationNode createMediaStreamDestination(); |
| 71 | 68 |
| 72 attribute EventHandler onstatechange; | 69 attribute EventHandler onstatechange; |
| 73 }; | 70 }; |
| OLD | NEW |