| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 "buffer size (" + String::number(bufferSize) | 364 "buffer size (" + String::number(bufferSize) |
| 364 + ") must be a power of two between 256 and 16384."); | 365 + ") must be a power of two between 256 and 16384."); |
| 365 } | 366 } |
| 366 return 0; | 367 return 0; |
| 367 } | 368 } |
| 368 | 369 |
| 369 refNode(node); // context keeps reference until we stop making javascript re
ndering callbacks | 370 refNode(node); // context keeps reference until we stop making javascript re
ndering callbacks |
| 370 return node; | 371 return node; |
| 371 } | 372 } |
| 372 | 373 |
| 374 StereoPannerNode* AudioContext::createStereoPanner() |
| 375 { |
| 376 ASSERT(isMainThread()); |
| 377 return StereoPannerNode::create(this, m_destinationNode->sampleRate()); |
| 378 } |
| 379 |
| 373 BiquadFilterNode* AudioContext::createBiquadFilter() | 380 BiquadFilterNode* AudioContext::createBiquadFilter() |
| 374 { | 381 { |
| 375 ASSERT(isMainThread()); | 382 ASSERT(isMainThread()); |
| 376 return BiquadFilterNode::create(this, m_destinationNode->sampleRate()); | 383 return BiquadFilterNode::create(this, m_destinationNode->sampleRate()); |
| 377 } | 384 } |
| 378 | 385 |
| 379 WaveShaperNode* AudioContext::createWaveShaper() | 386 WaveShaperNode* AudioContext::createWaveShaper() |
| 380 { | 387 { |
| 381 ASSERT(isMainThread()); | 388 ASSERT(isMainThread()); |
| 382 return WaveShaperNode::create(this); | 389 return WaveShaperNode::create(this); |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 | 884 |
| 878 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k
!= m_deferredCountModeChange.end(); ++k) | 885 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k
!= m_deferredCountModeChange.end(); ++k) |
| 879 (*k)->updateChannelCountMode(); | 886 (*k)->updateChannelCountMode(); |
| 880 | 887 |
| 881 m_deferredCountModeChange.clear(); | 888 m_deferredCountModeChange.clear(); |
| 882 } | 889 } |
| 883 | 890 |
| 884 } // namespace blink | 891 } // namespace blink |
| 885 | 892 |
| 886 #endif // ENABLE(WEB_AUDIO) | 893 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |