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

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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 322
322 AudioBufferSourceNode* node = 323 AudioBufferSourceNode* node =
323 AudioBufferSourceNode::create(*this, exceptionState); 324 AudioBufferSourceNode::create(*this, exceptionState);
324 325
325 // Do not add a reference to this source node now. The reference will be added 326 // Do not add a reference to this source node now. The reference will be added
326 // when start() is called. 327 // when start() is called.
327 328
328 return node; 329 return node;
329 } 330 }
330 331
332 ConstantSourceNode* BaseAudioContext::createConstantSource(
333 ExceptionState& exceptionState) {
334 DCHECK(isMainThread());
335
336 return ConstantSourceNode::create(*this, exceptionState);
337 }
338
331 MediaElementAudioSourceNode* BaseAudioContext::createMediaElementSource( 339 MediaElementAudioSourceNode* BaseAudioContext::createMediaElementSource(
332 HTMLMediaElement* mediaElement, 340 HTMLMediaElement* mediaElement,
333 ExceptionState& exceptionState) { 341 ExceptionState& exceptionState) {
334 DCHECK(isMainThread()); 342 DCHECK(isMainThread());
335 343
336 return MediaElementAudioSourceNode::create(*this, *mediaElement, 344 return MediaElementAudioSourceNode::create(*this, *mediaElement,
337 exceptionState); 345 exceptionState);
338 } 346 }
339 347
340 MediaStreamAudioSourceNode* BaseAudioContext::createMediaStreamSource( 348 MediaStreamAudioSourceNode* BaseAudioContext::createMediaStreamSource(
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 } 852 }
845 853
846 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const { 854 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const {
847 if (getExecutionContext()) 855 if (getExecutionContext())
848 return getExecutionContext()->getSecurityOrigin(); 856 return getExecutionContext()->getSecurityOrigin();
849 857
850 return nullptr; 858 return nullptr;
851 } 859 }
852 860
853 } // namespace blink 861 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698