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

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

Issue 723143002: bindings: Transition from ArrayBuffer to DOMArrayBuffer, part 3. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « Source/modules/webaudio/AsyncAudioDecoder.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 234
235 void AudioContext::decodeAudioData(DOMArrayBuffer* audioData, AudioBufferCallbac k* successCallback, AudioBufferCallback* errorCallback, ExceptionState& exceptio nState) 235 void AudioContext::decodeAudioData(DOMArrayBuffer* audioData, AudioBufferCallbac k* successCallback, AudioBufferCallback* errorCallback, ExceptionState& exceptio nState)
236 { 236 {
237 if (!audioData) { 237 if (!audioData) {
238 exceptionState.throwDOMException( 238 exceptionState.throwDOMException(
239 SyntaxError, 239 SyntaxError,
240 "invalid ArrayBuffer for audioData."); 240 "invalid ArrayBuffer for audioData.");
241 return; 241 return;
242 } 242 }
243 m_audioDecoder.decodeAsync(audioData->buffer(), sampleRate(), successCallbac k, errorCallback); 243 m_audioDecoder.decodeAsync(audioData, sampleRate(), successCallback, errorCa llback);
244 } 244 }
245 245
246 AudioBufferSourceNode* AudioContext::createBufferSource() 246 AudioBufferSourceNode* AudioContext::createBufferSource()
247 { 247 {
248 ASSERT(isMainThread()); 248 ASSERT(isMainThread());
249 AudioBufferSourceNode* node = AudioBufferSourceNode::create(this, m_destinat ionNode->sampleRate()); 249 AudioBufferSourceNode* node = AudioBufferSourceNode::create(this, m_destinat ionNode->sampleRate());
250 250
251 // Because this is an AudioScheduledSourceNode, the context keeps a referenc e until it has finished playing. 251 // Because this is an AudioScheduledSourceNode, the context keeps a referenc e until it has finished playing.
252 // When this happens, AudioScheduledSourceNode::finish() calls AudioContext: :notifyNodeFinishedProcessing(). 252 // When this happens, AudioScheduledSourceNode::finish() calls AudioContext: :notifyNodeFinishedProcessing().
253 refNode(node); 253 refNode(node);
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 877
878 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k != m_deferredCountModeChange.end(); ++k) 878 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k != m_deferredCountModeChange.end(); ++k)
879 (*k)->updateChannelCountMode(); 879 (*k)->updateChannelCountMode();
880 880
881 m_deferredCountModeChange.clear(); 881 m_deferredCountModeChange.clear();
882 } 882 }
883 883
884 } // namespace blink 884 } // namespace blink
885 885
886 #endif // ENABLE(WEB_AUDIO) 886 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AsyncAudioDecoder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698