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

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

Issue 161553002: Revert regression in AudioBufferSourceNode.start() with no buffer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 for (unsigned i = 0; i < outputBus->numberOfChannels(); ++i) 129 for (unsigned i = 0; i < outputBus->numberOfChannels(); ++i)
130 memset(outputBus->channel(i)->mutableData() + zeroStartFrame, 0, sizeof(float) * framesToZero); 130 memset(outputBus->channel(i)->mutableData() + zeroStartFrame, 0, sizeof(float) * framesToZero);
131 } 131 }
132 132
133 finish(); 133 finish();
134 } 134 }
135 135
136 return; 136 return;
137 } 137 }
138 138
139
140 void AudioScheduledSourceNode::start(double when, ExceptionState& exceptionState ) 139 void AudioScheduledSourceNode::start(double when, ExceptionState& exceptionState )
141 { 140 {
142 ASSERT(isMainThread()); 141 ASSERT(isMainThread());
143 142
144 if (m_playbackState != UNSCHEDULED_STATE) { 143 if (m_playbackState != UNSCHEDULED_STATE) {
145 exceptionState.throwDOMException( 144 exceptionState.throwDOMException(
146 InvalidStateError, 145 InvalidStateError,
147 "cannot call start more than once."); 146 "cannot call start more than once.");
148 return; 147 return;
149 } 148 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 void AudioScheduledSourceNode::NotifyEndedTask::notifyEnded() 205 void AudioScheduledSourceNode::NotifyEndedTask::notifyEnded()
207 { 206 {
208 RefPtr<Event> event = Event::create(EventTypeNames::ended); 207 RefPtr<Event> event = Event::create(EventTypeNames::ended);
209 event->setTarget(m_scheduledNode); 208 event->setTarget(m_scheduledNode);
210 m_scheduledNode->dispatchEvent(event.get()); 209 m_scheduledNode->dispatchEvent(event.get());
211 } 210 }
212 211
213 } // namespace WebCore 212 } // namespace WebCore
214 213
215 #endif // ENABLE(WEB_AUDIO) 214 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698