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

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

Issue 14636011: Support multiple HRTFDatabases for different sample-rates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 if (!channelsMatch) 109 if (!channelsMatch)
110 return; 110 return;
111 111
112 bool isRenderBusAllocated = m_renderBus->length() >= renderQuantumSize; 112 bool isRenderBusAllocated = m_renderBus->length() >= renderQuantumSize;
113 ASSERT(isRenderBusAllocated); 113 ASSERT(isRenderBusAllocated);
114 if (!isRenderBusAllocated) 114 if (!isRenderBusAllocated)
115 return; 115 return;
116 116
117 // Synchronize with HRTFDatabaseLoader. 117 // Synchronize with HRTFDatabaseLoader.
118 // The database must be loaded before we can proceed. 118 // The database must be loaded before we can proceed.
119 HRTFDatabaseLoader* loader = HRTFDatabaseLoader::loader(); 119 HRTFDatabaseLoader* loader = context()->hrtfDatabaseLoader();
120 ASSERT(loader); 120 ASSERT(loader);
121 if (!loader) 121 if (!loader)
122 return; 122 return;
123 123
124 loader->waitForLoaderThreadCompletion(); 124 loader->waitForLoaderThreadCompletion();
125 125
126 // Break up the render target into smaller "render quantize" sized pieces. 126 // Break up the render target into smaller "render quantize" sized pieces.
127 // Render until we're finished. 127 // Render until we're finished.
128 size_t framesToProcess = m_renderTarget->length(); 128 size_t framesToProcess = m_renderTarget->length();
129 unsigned numberOfChannels = m_renderTarget->numberOfChannels(); 129 unsigned numberOfChannels = m_renderTarget->numberOfChannels();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698