| 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 28 matching lines...) Expand all Loading... |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 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_renderThread(0) | 46 , m_renderThread(0) |
| 47 , m_startedRendering(false) | 47 , m_startedRendering(false) |
| 48 { | 48 { |
| 49 m_renderBus = adoptRef(new AudioBus(renderTarget->numberOfChannels(), render
QuantumSize)); | 49 m_renderBus = AudioBus::create(renderTarget->numberOfChannels(), renderQuant
umSize); |
| 50 } | 50 } |
| 51 | 51 |
| 52 OfflineAudioDestinationNode::~OfflineAudioDestinationNode() | 52 OfflineAudioDestinationNode::~OfflineAudioDestinationNode() |
| 53 { | 53 { |
| 54 uninitialize(); | 54 uninitialize(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void OfflineAudioDestinationNode::initialize() | 57 void OfflineAudioDestinationNode::initialize() |
| 58 { | 58 { |
| 59 if (isInitialized()) | 59 if (isInitialized()) |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 } | 161 } |
| 162 | 162 |
| 163 void OfflineAudioDestinationNode::notifyComplete() | 163 void OfflineAudioDestinationNode::notifyComplete() |
| 164 { | 164 { |
| 165 context()->fireCompletionEvent(); | 165 context()->fireCompletionEvent(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace WebCore | 168 } // namespace WebCore |
| 169 | 169 |
| 170 #endif // ENABLE(WEB_AUDIO) | 170 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |