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

Unified Diff: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp

Issue 2013623002: Set channelCount and maxChannelCount correctly for OfflineAudioContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
index 04edef246c88b263001690a05ddc2576e0642008..839218b2c46049990d422a47a21e8e7d27466a5a 100644
--- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
@@ -49,6 +49,11 @@ OfflineAudioDestinationHandler::OfflineAudioDestinationHandler(AudioNode& node,
{
m_renderBus = AudioBus::create(renderTarget->numberOfChannels(), renderQuantumSize);
m_framesToProcess = m_renderTarget->length();
+
+ // Node-specific defaults.
+ m_channelCount = m_renderTarget->numberOfChannels();
+ m_channelCountMode = Explicit;
+ m_channelInterpretation = AudioBus::Speakers;
}
PassRefPtr<OfflineAudioDestinationHandler> OfflineAudioDestinationHandler::create(AudioNode& node, AudioBuffer* renderTarget)
@@ -91,6 +96,11 @@ OfflineAudioContext* OfflineAudioDestinationHandler::context() const
return static_cast<OfflineAudioContext*>(AudioDestinationHandler::context());
}
+unsigned long OfflineAudioDestinationHandler::maxChannelCount() const
+{
+ return m_channelCount;
+}
+
void OfflineAudioDestinationHandler::startRendering()
{
ASSERT(isMainThread());
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698