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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 return DelayNode::create(this, m_destinationNode->sampleRate()); | 395 return DelayNode::create(this, m_destinationNode->sampleRate()); |
396 } | 396 } |
397 | 397 |
398 PassRefPtr<AudioChannelSplitter> AudioContext::createChannelSplitter() | 398 PassRefPtr<AudioChannelSplitter> AudioContext::createChannelSplitter() |
399 { | 399 { |
400 ASSERT(isMainThread()); | 400 ASSERT(isMainThread()); |
401 lazyInitialize(); | 401 lazyInitialize(); |
402 return AudioChannelSplitter::create(this, m_destinationNode->sampleRate()); | 402 return AudioChannelSplitter::create(this, m_destinationNode->sampleRate()); |
403 } | 403 } |
404 | 404 |
405 PassRefPtr<AudioChannelMerger> AudioContext::createChannelMerger() | |
406 { | |
407 ASSERT(isMainThread()); | |
408 lazyInitialize(); | |
409 return AudioChannelMerger::create(this, m_destinationNode->sampleRate()); | |
410 } | |
411 | |
412 void AudioContext::notifyNodeFinishedProcessing(AudioNode* node) | 405 void AudioContext::notifyNodeFinishedProcessing(AudioNode* node) |
413 { | 406 { |
414 ASSERT(isAudioThread()); | 407 ASSERT(isAudioThread()); |
415 m_finishedNodes.append(node); | 408 m_finishedNodes.append(node); |
416 } | 409 } |
417 | 410 |
418 void AudioContext::derefFinishedSourceNodes() | 411 void AudioContext::derefFinishedSourceNodes() |
419 { | 412 { |
420 ASSERT(isGraphOwner()); | 413 ASSERT(isGraphOwner()); |
421 ASSERT(isAudioThread() || isAudioThreadFinished()); | 414 ASSERT(isAudioThread() || isAudioThreadFinished()); |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 // Avoid firing the event if the document has already gone away. | 707 // Avoid firing the event if the document has already gone away. |
715 if (hasDocument()) { | 708 if (hasDocument()) { |
716 // Call the offline rendering completion event listener. | 709 // Call the offline rendering completion event listener. |
717 dispatchEvent(OfflineAudioCompletionEvent::create(renderedBuffer)); | 710 dispatchEvent(OfflineAudioCompletionEvent::create(renderedBuffer)); |
718 } | 711 } |
719 } | 712 } |
720 | 713 |
721 } // namespace WebCore | 714 } // namespace WebCore |
722 | 715 |
723 #endif // ENABLE(WEB_AUDIO) | 716 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |