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 30 matching lines...) Expand all Loading... |
41 // All panning is relative to this listener. | 41 // All panning is relative to this listener. |
42 readonly attribute AudioListener listener; | 42 readonly attribute AudioListener listener; |
43 | 43 |
44 // Number of AudioBufferSourceNodes that are currently playing. | 44 // Number of AudioBufferSourceNodes that are currently playing. |
45 readonly attribute unsigned long activeSourceCount; | 45 readonly attribute unsigned long activeSourceCount; |
46 ···· | 46 ···· |
47 [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, u
nsigned long numberOfFrames, float sampleRate); | 47 [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, u
nsigned long numberOfFrames, float sampleRate); |
48 [RaisesException] AudioBuffer createBuffer(ArrayBuffer? buffer, boolean mixT
oMono); | 48 [RaisesException] AudioBuffer createBuffer(ArrayBuffer? buffer, boolean mixT
oMono); |
49 | 49 |
50 // Asynchronous audio file data decoding. | 50 // Asynchronous audio file data decoding. |
51 [RaisesException] void decodeAudioData(ArrayBuffer audioData, [Callback] Aud
ioBufferCallback successCallback, [Callback] optional AudioBufferCallback errorC
allback); | 51 [RaisesException] void decodeAudioData(ArrayBuffer audioData, AudioBufferCal
lback successCallback, optional AudioBufferCallback errorCallback); |
52 | 52 |
53 // Sources | 53 // Sources |
54 AudioBufferSourceNode createBufferSource(); | 54 AudioBufferSourceNode createBufferSource(); |
55 | 55 |
56 #if defined(ENABLE_VIDEO) && ENABLE_VIDEO | |
57 [RaisesException] MediaElementAudioSourceNode createMediaElementSource(HTMLM
ediaElement mediaElement); | 56 [RaisesException] MediaElementAudioSourceNode createMediaElementSource(HTMLM
ediaElement mediaElement); |
58 #endif | |
59 | 57 |
60 #if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM | 58 #if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM |
61 [RaisesException] MediaStreamAudioSourceNode createMediaStreamSource(MediaSt
ream mediaStream); | 59 [RaisesException] MediaStreamAudioSourceNode createMediaStreamSource(MediaSt
ream mediaStream); |
62 MediaStreamAudioDestinationNode createMediaStreamDestination(); | 60 MediaStreamAudioDestinationNode createMediaStreamDestination(); |
63 #endif | 61 #endif |
64 | 62 |
65 // Processing nodes | 63 // Processing nodes |
66 GainNode createGain(); | 64 GainNode createGain(); |
67 [RaisesException] DelayNode createDelay(optional double maxDelayTime); | 65 [RaisesException] DelayNode createDelay(optional double maxDelayTime); |
68 BiquadFilterNode createBiquadFilter(); | 66 BiquadFilterNode createBiquadFilter(); |
69 WaveShaperNode createWaveShaper(); | 67 WaveShaperNode createWaveShaper(); |
70 PannerNode createPanner(); | 68 PannerNode createPanner(); |
71 ConvolverNode createConvolver(); | 69 ConvolverNode createConvolver(); |
72 DynamicsCompressorNode createDynamicsCompressor(); | 70 DynamicsCompressorNode createDynamicsCompressor(); |
73 AnalyserNode createAnalyser(); | 71 AnalyserNode createAnalyser(); |
74 [RaisesException] ScriptProcessorNode createScriptProcessor(unsigned long bu
fferSize, optional unsigned long numberOfInputChannels, optional unsigned long n
umberOfOutputChannels); | 72 [RaisesException] ScriptProcessorNode createScriptProcessor(unsigned long bu
fferSize, optional unsigned long numberOfInputChannels, optional unsigned long n
umberOfOutputChannels); |
75 OscillatorNode createOscillator(); | 73 OscillatorNode createOscillator(); |
76 [RaisesException] WaveTable createWaveTable(Float32Array real, Float32Array
imag); | 74 [RaisesException] WaveTable createWaveTable(Float32Array real, Float32Array
imag); |
77 | 75 |
78 // Channel splitting and merging | 76 // Channel splitting and merging |
79 [RaisesException] ChannelSplitterNode createChannelSplitter(optional unsigne
d long numberOfOutputs); | 77 [RaisesException] ChannelSplitterNode createChannelSplitter(optional unsigne
d long numberOfOutputs); |
80 [RaisesException] ChannelMergerNode createChannelMerger(optional unsigned lo
ng numberOfInputs); | 78 [RaisesException] ChannelMergerNode createChannelMerger(optional unsigned lo
ng numberOfInputs); |
81 | 79 |
82 // Offline rendering | 80 // Offline rendering |
83 // void prepareOfflineBufferRendering(unsigned long numberOfChannels, unsign
ed long numberOfFrames, float sampleRate); | 81 // void prepareOfflineBufferRendering(unsigned long numberOfChannels, unsign
ed long numberOfFrames, float sampleRate); |
84 attribute EventListener oncomplete; | 82 attribute EventListener oncomplete; |
85 void startRendering(); | 83 void startRendering(); |
86 | 84 |
87 #if defined(ENABLE_LEGACY_WEB_AUDIO) && ENABLE_LEGACY_WEB_AUDIO | |
88 [MeasureAs=LegacyWebAudio, ImplementedAs=createGain] GainNode createGainNode
(); | 85 [MeasureAs=LegacyWebAudio, ImplementedAs=createGain] GainNode createGainNode
(); |
89 [MeasureAs=LegacyWebAudio, ImplementedAs=createDelay, RaisesException] Delay
Node createDelayNode(optional double maxDelayTime); | 86 [MeasureAs=LegacyWebAudio, ImplementedAs=createDelay, RaisesException] Delay
Node createDelayNode(optional double maxDelayTime); |
90 | 87 |
91 [MeasureAs=LegacyWebAudio, ImplementedAs=createScriptProcessor, RaisesExcept
ion] ScriptProcessorNode createJavaScriptNode(unsigned long bufferSize, optional
unsigned long numberOfInputChannels, optional unsigned long numberOfOutputChann
els); | 88 [MeasureAs=LegacyWebAudio, ImplementedAs=createScriptProcessor, RaisesExcept
ion] ScriptProcessorNode createJavaScriptNode(unsigned long bufferSize, optional
unsigned long numberOfInputChannels, optional unsigned long numberOfOutputChann
els); |
92 #endif | |
93 | 89 |
94 }; | 90 }; |
OLD | NEW |