Chromium Code Reviews| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 #include "modules/webaudio/MediaElementAudioSourceNode.h" | 53 #include "modules/webaudio/MediaElementAudioSourceNode.h" |
| 54 #include "modules/webaudio/MediaStreamAudioDestinationNode.h" | 54 #include "modules/webaudio/MediaStreamAudioDestinationNode.h" |
| 55 #include "modules/webaudio/MediaStreamAudioSourceNode.h" | 55 #include "modules/webaudio/MediaStreamAudioSourceNode.h" |
| 56 #include "modules/webaudio/OfflineAudioCompletionEvent.h" | 56 #include "modules/webaudio/OfflineAudioCompletionEvent.h" |
| 57 #include "modules/webaudio/OfflineAudioContext.h" | 57 #include "modules/webaudio/OfflineAudioContext.h" |
| 58 #include "modules/webaudio/OfflineAudioDestinationNode.h" | 58 #include "modules/webaudio/OfflineAudioDestinationNode.h" |
| 59 #include "modules/webaudio/OscillatorNode.h" | 59 #include "modules/webaudio/OscillatorNode.h" |
| 60 #include "modules/webaudio/PannerNode.h" | 60 #include "modules/webaudio/PannerNode.h" |
| 61 #include "modules/webaudio/PeriodicWave.h" | 61 #include "modules/webaudio/PeriodicWave.h" |
| 62 #include "modules/webaudio/ScriptProcessorNode.h" | 62 #include "modules/webaudio/ScriptProcessorNode.h" |
| 63 #include "modules/webaudio/StereoPannerNode.h" | |
| 63 #include "modules/webaudio/WaveShaperNode.h" | 64 #include "modules/webaudio/WaveShaperNode.h" |
| 64 #include "platform/audio/FFTFrame.h" | 65 #include "platform/audio/FFTFrame.h" |
| 65 #include "platform/audio/HRTFPanner.h" | 66 #include "platform/audio/HRTFPanner.h" |
| 66 #include "wtf/Atomics.h" | 67 #include "wtf/Atomics.h" |
| 67 #include "wtf/PassOwnPtr.h" | 68 #include "wtf/PassOwnPtr.h" |
| 68 #include "wtf/text/WTFString.h" | 69 #include "wtf/text/WTFString.h" |
| 69 | 70 |
| 70 #if DEBUG_AUDIONODE_REFERENCES | 71 #if DEBUG_AUDIONODE_REFERENCES |
| 71 #include <stdio.h> | 72 #include <stdio.h> |
| 72 #endif | 73 #endif |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 "buffer size (" + String::number(bufferSize) | 359 "buffer size (" + String::number(bufferSize) |
| 359 + ") must be a power of two between 256 and 16384."); | 360 + ") must be a power of two between 256 and 16384."); |
| 360 } | 361 } |
| 361 return 0; | 362 return 0; |
| 362 } | 363 } |
| 363 | 364 |
| 364 refNode(node); // context keeps reference until we stop making javascript re ndering callbacks | 365 refNode(node); // context keeps reference until we stop making javascript re ndering callbacks |
| 365 return node; | 366 return node; |
| 366 } | 367 } |
| 367 | 368 |
| 369 StereoPannerNode* AudioContext::createStereoPanner() | |
| 370 { | |
|
Raymond Toy
2014/11/11 19:41:47
Add ASSERT(isMainThread()), like for other creator
hongchan
2014/11/12 00:06:53
Done.
| |
| 371 return StereoPannerNode::create(this, m_destinationNode->sampleRate()); | |
| 372 } | |
| 373 | |
| 368 BiquadFilterNode* AudioContext::createBiquadFilter() | 374 BiquadFilterNode* AudioContext::createBiquadFilter() |
| 369 { | 375 { |
| 370 ASSERT(isMainThread()); | 376 ASSERT(isMainThread()); |
| 371 return BiquadFilterNode::create(this, m_destinationNode->sampleRate()); | 377 return BiquadFilterNode::create(this, m_destinationNode->sampleRate()); |
| 372 } | 378 } |
| 373 | 379 |
| 374 WaveShaperNode* AudioContext::createWaveShaper() | 380 WaveShaperNode* AudioContext::createWaveShaper() |
| 375 { | 381 { |
| 376 ASSERT(isMainThread()); | 382 ASSERT(isMainThread()); |
| 377 return WaveShaperNode::create(this); | 383 return WaveShaperNode::create(this); |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 865 | 871 |
| 866 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k != m_deferredCountModeChange.end(); ++k) | 872 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k != m_deferredCountModeChange.end(); ++k) |
| 867 (*k)->updateChannelCountMode(); | 873 (*k)->updateChannelCountMode(); |
| 868 | 874 |
| 869 m_deferredCountModeChange.clear(); | 875 m_deferredCountModeChange.clear(); |
| 870 } | 876 } |
| 871 | 877 |
| 872 } // namespace blink | 878 } // namespace blink |
| 873 | 879 |
| 874 #endif // ENABLE(WEB_AUDIO) | 880 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |