OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "modules/webaudio/AudioBuffer.h" | 43 #include "modules/webaudio/AudioBuffer.h" |
44 #include "modules/webaudio/AudioBufferCallback.h" | 44 #include "modules/webaudio/AudioBufferCallback.h" |
45 #include "modules/webaudio/AudioBufferSourceNode.h" | 45 #include "modules/webaudio/AudioBufferSourceNode.h" |
46 #include "modules/webaudio/AudioContext.h" | 46 #include "modules/webaudio/AudioContext.h" |
47 #include "modules/webaudio/AudioListener.h" | 47 #include "modules/webaudio/AudioListener.h" |
48 #include "modules/webaudio/AudioNodeInput.h" | 48 #include "modules/webaudio/AudioNodeInput.h" |
49 #include "modules/webaudio/AudioNodeOutput.h" | 49 #include "modules/webaudio/AudioNodeOutput.h" |
50 #include "modules/webaudio/BiquadFilterNode.h" | 50 #include "modules/webaudio/BiquadFilterNode.h" |
51 #include "modules/webaudio/ChannelMergerNode.h" | 51 #include "modules/webaudio/ChannelMergerNode.h" |
52 #include "modules/webaudio/ChannelSplitterNode.h" | 52 #include "modules/webaudio/ChannelSplitterNode.h" |
| 53 #include "modules/webaudio/ConstantSourceNode.h" |
53 #include "modules/webaudio/ConvolverNode.h" | 54 #include "modules/webaudio/ConvolverNode.h" |
54 #include "modules/webaudio/DefaultAudioDestinationNode.h" | 55 #include "modules/webaudio/DefaultAudioDestinationNode.h" |
55 #include "modules/webaudio/DelayNode.h" | 56 #include "modules/webaudio/DelayNode.h" |
56 #include "modules/webaudio/DynamicsCompressorNode.h" | 57 #include "modules/webaudio/DynamicsCompressorNode.h" |
57 #include "modules/webaudio/GainNode.h" | 58 #include "modules/webaudio/GainNode.h" |
58 #include "modules/webaudio/IIRFilterNode.h" | 59 #include "modules/webaudio/IIRFilterNode.h" |
59 #include "modules/webaudio/MediaElementAudioSourceNode.h" | 60 #include "modules/webaudio/MediaElementAudioSourceNode.h" |
60 #include "modules/webaudio/MediaStreamAudioDestinationNode.h" | 61 #include "modules/webaudio/MediaStreamAudioDestinationNode.h" |
61 #include "modules/webaudio/MediaStreamAudioSourceNode.h" | 62 #include "modules/webaudio/MediaStreamAudioSourceNode.h" |
62 #include "modules/webaudio/OfflineAudioCompletionEvent.h" | 63 #include "modules/webaudio/OfflineAudioCompletionEvent.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 321 |
321 AudioBufferSourceNode* node = | 322 AudioBufferSourceNode* node = |
322 AudioBufferSourceNode::create(*this, exceptionState); | 323 AudioBufferSourceNode::create(*this, exceptionState); |
323 | 324 |
324 // Do not add a reference to this source node now. The reference will be added | 325 // Do not add a reference to this source node now. The reference will be added |
325 // when start() is called. | 326 // when start() is called. |
326 | 327 |
327 return node; | 328 return node; |
328 } | 329 } |
329 | 330 |
| 331 ConstantSourceNode* BaseAudioContext::createConstantSource( |
| 332 ExceptionState& exceptionState) { |
| 333 DCHECK(isMainThread()); |
| 334 |
| 335 return ConstantSourceNode::create(*this, exceptionState); |
| 336 } |
| 337 |
330 MediaElementAudioSourceNode* BaseAudioContext::createMediaElementSource( | 338 MediaElementAudioSourceNode* BaseAudioContext::createMediaElementSource( |
331 HTMLMediaElement* mediaElement, | 339 HTMLMediaElement* mediaElement, |
332 ExceptionState& exceptionState) { | 340 ExceptionState& exceptionState) { |
333 DCHECK(isMainThread()); | 341 DCHECK(isMainThread()); |
334 | 342 |
335 return MediaElementAudioSourceNode::create(*this, *mediaElement, | 343 return MediaElementAudioSourceNode::create(*this, *mediaElement, |
336 exceptionState); | 344 exceptionState); |
337 } | 345 } |
338 | 346 |
339 MediaStreamAudioSourceNode* BaseAudioContext::createMediaStreamSource( | 347 MediaStreamAudioSourceNode* BaseAudioContext::createMediaStreamSource( |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 } | 851 } |
844 | 852 |
845 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const { | 853 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const { |
846 if (getExecutionContext()) | 854 if (getExecutionContext()) |
847 return getExecutionContext()->getSecurityOrigin(); | 855 return getExecutionContext()->getSecurityOrigin(); |
848 | 856 |
849 return nullptr; | 857 return nullptr; |
850 } | 858 } |
851 | 859 |
852 } // namespace blink | 860 } // namespace blink |
OLD | NEW |