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, MeasureAs=AudioContextDecodeAudioData] void decodeAudioDat
a(ArrayBuffer audioData, AudioBufferCallback successCallback, optional AudioBuff
erCallback errorCallback); | 59 [RaisesException, CallWith=ScriptState, MeasureAs=AudioContextDecodeAudioDat
a] Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData, optional AudioBuf
ferCallback successCallback, optional AudioBufferCallback errorCallback); |
60 | 60 |
61 // Sources | 61 // Sources |
62 [RaisesException, MeasureAs=AudioContextCreateBufferSource] AudioBufferSourc
eNode createBufferSource(); | 62 [RaisesException, MeasureAs=AudioContextCreateBufferSource] AudioBufferSourc
eNode createBufferSource(); |
63 | 63 |
64 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme
ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); | 64 [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaEleme
ntAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); |
65 | 65 |
66 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource, RaisesExcep
tion] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream
); | 66 [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource, RaisesExcep
tion] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream
); |
67 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS
treamAudioDestinationNode createMediaStreamDestination(); | 67 [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaS
treamAudioDestinationNode createMediaStreamDestination(); |
68 | 68 |
69 // Processing nodes | 69 // Processing nodes |
(...skipping 16 matching lines...) Expand all Loading... |
86 | 86 |
87 // Close | 87 // Close |
88 [MeasureAs=AudioContextClose, CallWith=ScriptState, ImplementedAs=closeConte
xt] Promise<void> close(); | 88 [MeasureAs=AudioContextClose, CallWith=ScriptState, ImplementedAs=closeConte
xt] Promise<void> close(); |
89 | 89 |
90 // Pause/resume | 90 // Pause/resume |
91 [MeasureAs=AudioContextSuspend, CallWith=ScriptState, ImplementedAs=suspendC
ontext] Promise<void> suspend(); | 91 [MeasureAs=AudioContextSuspend, CallWith=ScriptState, ImplementedAs=suspendC
ontext] Promise<void> suspend(); |
92 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon
text] Promise<void> resume(); | 92 [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeCon
text] Promise<void> resume(); |
93 | 93 |
94 attribute EventHandler onstatechange; | 94 attribute EventHandler onstatechange; |
95 }; | 95 }; |
OLD | NEW |