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 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 // All panning is relative to this listener. | 50 // All panning is relative to this listener. |
51 readonly attribute AudioListener listener; | 51 readonly attribute AudioListener listener; |
52 | 52 |
53 // Current state of the AudioContext | 53 // Current state of the AudioContext |
54 readonly attribute AudioContextState state; | 54 readonly attribute AudioContextState state; |
55 | 55 |
56 [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, u
nsigned long numberOfFrames, float sampleRate); | 56 [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, u
nsigned long numberOfFrames, float sampleRate); |
57 | 57 |
58 // Asynchronous audio file data decoding. | 58 // Asynchronous audio file data decoding. |
59 [RaisesException] void decodeAudioData(ArrayBuffer audioData, AudioBufferCal
lback successCallback, optional AudioBufferCallback errorCallback); | 59 [MeasureAs=AudioContextDecodeAudioData, RaisesException] void decodeAudioDat
a(ArrayBuffer audioData, AudioBufferCallback successCallback, optional AudioBuff
erCallback errorCallback); |
60 | 60 |
61 // Sources | 61 // Sources |
62 AudioBufferSourceNode createBufferSource(); | 62 [MeasureAs=AudioContextCreateBufferSource] AudioBufferSourceNode createBuffe
rSource(); |
63 | 63 |
64 [RaisesException] MediaElementAudioSourceNode createMediaElementSource(HTMLM
ediaElement mediaElement); | 64 [MeasureAs=AudioContextCreateMediaElementSource, RaisesException] MediaEleme
ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); |
65 | 65 |
66 [RaisesException] MediaStreamAudioSourceNode createMediaStreamSource(MediaSt
ream mediaStream); | 66 [MeasureAs=AudioContextCreateMediaStreamSource, RaisesException] MediaStream
AudioSourceNode createMediaStreamSource(MediaStream mediaStream); |
67 MediaStreamAudioDestinationNode createMediaStreamDestination(); | 67 [MeasureAs=AudioContextCreateMediaStreamDestination] MediaStreamAudioDestina
tionNode createMediaStreamDestination(); |
68 | 68 |
69 // Processing nodes | 69 // Processing nodes |
70 GainNode createGain(); | 70 [MeasureAs=AudioContextCreateGain] GainNode createGain(); |
71 [RaisesException] DelayNode createDelay(optional double maxDelayTime); | 71 [MeasureAs=AudioContextCreateDelay, RaisesException] DelayNode createDelay(o
ptional double maxDelayTime); |
72 BiquadFilterNode createBiquadFilter(); | 72 [MeasureAs=AudioContextCreateBiquadFilter] BiquadFilterNode createBiquadFilt
er(); |
73 WaveShaperNode createWaveShaper(); | 73 [MeasureAs=AudioContextCreateWaveShaper] WaveShaperNode createWaveShaper(); |
74 PannerNode createPanner(); | 74 [MeasureAs=AudioContextCreatePanner] PannerNode createPanner(); |
75 ConvolverNode createConvolver(); | 75 [MeasureAs=AudioContextCreateConvolver] ConvolverNode createConvolver(); |
76 DynamicsCompressorNode createDynamicsCompressor(); | 76 [MeasureAs=AudioContextCreateDynamicsCompressor] DynamicsCompressorNode crea
teDynamicsCompressor(); |
77 AnalyserNode createAnalyser(); | 77 [MeasureAs=AudioContextCreateAnalyser] AnalyserNode createAnalyser(); |
78 [RaisesException] ScriptProcessorNode createScriptProcessor(optional unsigne
d long bufferSize, optional unsigned long numberOfInputChannels, optional unsign
ed long numberOfOutputChannels); | 78 [MeasureAs=AudioContextCreateScriptProcessor, RaisesException] ScriptProcess
orNode createScriptProcessor(optional unsigned long bufferSize, optional unsigne
d long numberOfInputChannels, optional unsigned long numberOfOutputChannels); |
79 StereoPannerNode createStereoPanner(); | 79 [MeasureAs=AudioContextCreatePanner] StereoPannerNode createStereoPanner(); |
80 OscillatorNode createOscillator(); | 80 [MeasureAs=AudioContextCreateOscillator] OscillatorNode createOscillator(); |
81 [RaisesException] PeriodicWave createPeriodicWave(Float32Array real, Float32
Array imag); | 81 [MeasureAs=AudioContextCreatePeriodicWave, RaisesException] PeriodicWave cre
atePeriodicWave(Float32Array real, Float32Array imag); |
82 | 82 |
83 // Channel splitting and merging | 83 // Channel splitting and merging |
84 [RaisesException] ChannelSplitterNode createChannelSplitter(optional unsigne
d long numberOfOutputs); | 84 [MeasureAs=AudioContextCreateChannelSplitter, RaisesException] ChannelSplitt
erNode createChannelSplitter(optional unsigned long numberOfOutputs); |
85 [RaisesException] ChannelMergerNode createChannelMerger(optional unsigned lo
ng numberOfInputs); | 85 [MeasureAs=AudioContextCreateChannelMerger, RaisesException] ChannelMergerNo
de createChannelMerger(optional unsigned long numberOfInputs); |
86 | 86 |
87 // Pause/resume | 87 // Pause/resume |
88 [CallWith=ScriptState, ImplementedAs=suspendContext] Promise suspend(); | 88 [MeasureAs=AudioContextSuspend, CallWith=ScriptState, ImplementedAs=suspendC
ontext] Promise suspend(); |
89 [CallWith=ScriptState, ImplementedAs=resumeContext] Promise resume(); | 89 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon
text] Promise resume(); |
90 | 90 |
91 attribute EventHandler onstatechange; | 91 attribute EventHandler onstatechange; |
92 }; | 92 }; |
OLD | NEW |