Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp

Issue 2134813002: Implement ConstantSourceNode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 30 matching lines...) Expand all
41 #include "modules/webaudio/AudioBuffer.h" 41 #include "modules/webaudio/AudioBuffer.h"
42 #include "modules/webaudio/AudioBufferCallback.h" 42 #include "modules/webaudio/AudioBufferCallback.h"
43 #include "modules/webaudio/AudioBufferSourceNode.h" 43 #include "modules/webaudio/AudioBufferSourceNode.h"
44 #include "modules/webaudio/AudioContext.h" 44 #include "modules/webaudio/AudioContext.h"
45 #include "modules/webaudio/AudioListener.h" 45 #include "modules/webaudio/AudioListener.h"
46 #include "modules/webaudio/AudioNodeInput.h" 46 #include "modules/webaudio/AudioNodeInput.h"
47 #include "modules/webaudio/AudioNodeOutput.h" 47 #include "modules/webaudio/AudioNodeOutput.h"
48 #include "modules/webaudio/BiquadFilterNode.h" 48 #include "modules/webaudio/BiquadFilterNode.h"
49 #include "modules/webaudio/ChannelMergerNode.h" 49 #include "modules/webaudio/ChannelMergerNode.h"
50 #include "modules/webaudio/ChannelSplitterNode.h" 50 #include "modules/webaudio/ChannelSplitterNode.h"
51 #include "modules/webaudio/ConstantSourceNode.h"
51 #include "modules/webaudio/ConvolverNode.h" 52 #include "modules/webaudio/ConvolverNode.h"
52 #include "modules/webaudio/DefaultAudioDestinationNode.h" 53 #include "modules/webaudio/DefaultAudioDestinationNode.h"
53 #include "modules/webaudio/DelayNode.h" 54 #include "modules/webaudio/DelayNode.h"
54 #include "modules/webaudio/DynamicsCompressorNode.h" 55 #include "modules/webaudio/DynamicsCompressorNode.h"
55 #include "modules/webaudio/GainNode.h" 56 #include "modules/webaudio/GainNode.h"
56 #include "modules/webaudio/IIRFilterNode.h" 57 #include "modules/webaudio/IIRFilterNode.h"
57 #include "modules/webaudio/MediaElementAudioSourceNode.h" 58 #include "modules/webaudio/MediaElementAudioSourceNode.h"
58 #include "modules/webaudio/MediaStreamAudioDestinationNode.h" 59 #include "modules/webaudio/MediaStreamAudioDestinationNode.h"
59 #include "modules/webaudio/MediaStreamAudioSourceNode.h" 60 #include "modules/webaudio/MediaStreamAudioSourceNode.h"
60 #include "modules/webaudio/OfflineAudioCompletionEvent.h" 61 #include "modules/webaudio/OfflineAudioCompletionEvent.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 DCHECK(isMainThread()); 325 DCHECK(isMainThread());
325 326
326 AudioBufferSourceNode* node = AudioBufferSourceNode::create(*this, exception State); 327 AudioBufferSourceNode* node = AudioBufferSourceNode::create(*this, exception State);
327 328
328 // Do not add a reference to this source node now. The reference will be add ed when start() is 329 // Do not add a reference to this source node now. The reference will be add ed when start() is
329 // called. 330 // called.
330 331
331 return node; 332 return node;
332 } 333 }
333 334
335 ConstantSourceNode* BaseAudioContext::createConstantSource(ExceptionState& excep tionState)
336 {
337 DCHECK(isMainThread());
338
339 return ConstantSourceNode::create(*this, exceptionState);
340 }
341
334 MediaElementAudioSourceNode* BaseAudioContext::createMediaElementSource(HTMLMedi aElement* mediaElement, ExceptionState& exceptionState) 342 MediaElementAudioSourceNode* BaseAudioContext::createMediaElementSource(HTMLMedi aElement* mediaElement, ExceptionState& exceptionState)
335 { 343 {
336 DCHECK(isMainThread()); 344 DCHECK(isMainThread());
337 345
338 return MediaElementAudioSourceNode::create(*this, *mediaElement, exceptionSt ate); 346 return MediaElementAudioSourceNode::create(*this, *mediaElement, exceptionSt ate);
339 } 347 }
340 348
341 MediaStreamAudioSourceNode* BaseAudioContext::createMediaStreamSource(MediaStrea m* mediaStream, ExceptionState& exceptionState) 349 MediaStreamAudioSourceNode* BaseAudioContext::createMediaStreamSource(MediaStrea m* mediaStream, ExceptionState& exceptionState)
342 { 350 {
343 DCHECK(isMainThread()); 351 DCHECK(isMainThread());
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 847
840 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const 848 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const
841 { 849 {
842 if (getExecutionContext()) 850 if (getExecutionContext())
843 return getExecutionContext()->getSecurityOrigin(); 851 return getExecutionContext()->getSecurityOrigin();
844 852
845 return nullptr; 853 return nullptr;
846 } 854 }
847 855
848 } // namespace blink 856 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698