Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp

Issue 2582443004: ScriptProcessor buffer size should be consistent with callback size (Closed)
Patch Set: Make callbackBufferSize pure virtual Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698