| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 18 matching lines...) Expand all Loading... |
| 29 #include "modules/webaudio/OfflineAudioDestinationNode.h" | 29 #include "modules/webaudio/OfflineAudioDestinationNode.h" |
| 30 | 30 |
| 31 #include <algorithm> | 31 #include <algorithm> |
| 32 #include "platform/audio/AudioBus.h" | 32 #include "platform/audio/AudioBus.h" |
| 33 #include "platform/audio/HRTFDatabaseLoader.h" | 33 #include "platform/audio/HRTFDatabaseLoader.h" |
| 34 #include "modules/webaudio/AudioContext.h" | 34 #include "modules/webaudio/AudioContext.h" |
| 35 #include "platform/Task.h" | 35 #include "platform/Task.h" |
| 36 #include "public/platform/Platform.h" | 36 #include "public/platform/Platform.h" |
| 37 #include "wtf/MainThread.h" | 37 #include "wtf/MainThread.h" |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace blink { |
| 40 | 40 |
| 41 const size_t renderQuantumSize = 128; | 41 const size_t renderQuantumSize = 128; |
| 42 | 42 |
| 43 OfflineAudioDestinationNode::OfflineAudioDestinationNode(AudioContext* context,
AudioBuffer* renderTarget) | 43 OfflineAudioDestinationNode::OfflineAudioDestinationNode(AudioContext* context,
AudioBuffer* renderTarget) |
| 44 : AudioDestinationNode(context, renderTarget->sampleRate()) | 44 : AudioDestinationNode(context, renderTarget->sampleRate()) |
| 45 , m_renderTarget(renderTarget) | 45 , m_renderTarget(renderTarget) |
| 46 , m_startedRendering(false) | 46 , m_startedRendering(false) |
| 47 { | 47 { |
| 48 m_renderBus = AudioBus::create(renderTarget->numberOfChannels(), renderQuant
umSize); | 48 m_renderBus = AudioBus::create(renderTarget->numberOfChannels(), renderQuant
umSize); |
| 49 } | 49 } |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 { | 150 { |
| 151 context()->fireCompletionEvent(); | 151 context()->fireCompletionEvent(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void OfflineAudioDestinationNode::trace(Visitor* visitor) | 154 void OfflineAudioDestinationNode::trace(Visitor* visitor) |
| 155 { | 155 { |
| 156 visitor->trace(m_renderTarget); | 156 visitor->trace(m_renderTarget); |
| 157 AudioDestinationNode::trace(visitor); | 157 AudioDestinationNode::trace(visitor); |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace WebCore | 160 } // namespace blink |
| 161 | 161 |
| 162 #endif // ENABLE(WEB_AUDIO) | 162 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |