| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 BLINK_FROM_HERE, | 126 BLINK_FROM_HERE, |
| 127 crossThreadBind(&OfflineAudioDestinationHandler::doOfflineRendering, | 127 crossThreadBind(&OfflineAudioDestinationHandler::doOfflineRendering, |
| 128 wrapPassRefPtr(this))); | 128 wrapPassRefPtr(this))); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void OfflineAudioDestinationHandler::stopRendering() { | 131 void OfflineAudioDestinationHandler::stopRendering() { |
| 132 // offline audio rendering CANNOT BE stopped by JavaScript. | 132 // offline audio rendering CANNOT BE stopped by JavaScript. |
| 133 ASSERT_NOT_REACHED(); | 133 ASSERT_NOT_REACHED(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 size_t OfflineAudioDestinationHandler::callbackBufferSize() const { |
| 137 // The callback buffer size has no meaning for an offline context. |
| 138 NOTREACHED(); |
| 139 return 0; |
| 140 } |
| 136 WebThread* OfflineAudioDestinationHandler::offlineRenderThread() { | 141 WebThread* OfflineAudioDestinationHandler::offlineRenderThread() { |
| 137 DCHECK(m_renderThread); | 142 DCHECK(m_renderThread); |
| 138 | 143 |
| 139 return m_renderThread.get(); | 144 return m_renderThread.get(); |
| 140 } | 145 } |
| 141 | 146 |
| 142 void OfflineAudioDestinationHandler::startOfflineRendering() { | 147 void OfflineAudioDestinationHandler::startOfflineRendering() { |
| 143 DCHECK(!isMainThread()); | 148 DCHECK(!isMainThread()); |
| 144 | 149 |
| 145 DCHECK(m_renderBus); | 150 DCHECK(m_renderBus); |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 setHandler(OfflineAudioDestinationHandler::create(*this, renderTarget)); | 336 setHandler(OfflineAudioDestinationHandler::create(*this, renderTarget)); |
| 332 } | 337 } |
| 333 | 338 |
| 334 OfflineAudioDestinationNode* OfflineAudioDestinationNode::create( | 339 OfflineAudioDestinationNode* OfflineAudioDestinationNode::create( |
| 335 BaseAudioContext* context, | 340 BaseAudioContext* context, |
| 336 AudioBuffer* renderTarget) { | 341 AudioBuffer* renderTarget) { |
| 337 return new OfflineAudioDestinationNode(*context, renderTarget); | 342 return new OfflineAudioDestinationNode(*context, renderTarget); |
| 338 } | 343 } |
| 339 | 344 |
| 340 } // namespace blink | 345 } // namespace blink |
| OLD | NEW |