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

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

Issue 20300002: Fix trailing whitespace in .cpp, .h, and .idl files (ex. Source/core) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/AudioParam.cpp ('k') | Source/modules/webaudio/AudioProcessingEvent.h » ('j') | 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) 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 bool isValid = event.type() < ParamEvent::LastType 74 bool isValid = event.type() < ParamEvent::LastType
75 && isValidNumber(event.value()) 75 && isValidNumber(event.value())
76 && isValidNumber(event.time()) 76 && isValidNumber(event.time())
77 && isValidNumber(event.timeConstant()) 77 && isValidNumber(event.timeConstant())
78 && isValidNumber(event.duration()) 78 && isValidNumber(event.duration())
79 && event.duration() >= 0; 79 && event.duration() >= 0;
80 80
81 ASSERT(isValid); 81 ASSERT(isValid);
82 if (!isValid) 82 if (!isValid)
83 return; 83 return;
84 84
85 MutexLocker locker(m_eventsLock); 85 MutexLocker locker(m_eventsLock);
86 86
87 unsigned i = 0; 87 unsigned i = 0;
88 double insertTime = event.time(); 88 double insertTime = event.time();
89 for (i = 0; i < m_events.size(); ++i) { 89 for (i = 0; i < m_events.size(); ++i) {
90 // Overwrite same event type and time. 90 // Overwrite same event type and time.
91 if (m_events[i].time() == insertTime && m_events[i].type() == event.type ()) { 91 if (m_events[i].time() == insertTime && m_events[i].type() == event.type ()) {
92 m_events[i] = event; 92 m_events[i] = event;
93 return; 93 return;
94 } 94 }
95 95
96 if (m_events[i].time() > insertTime) 96 if (m_events[i].time() > insertTime)
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // to the end of the values buffer. 364 // to the end of the values buffer.
365 for (; writeIndex < numberOfValues; ++writeIndex) 365 for (; writeIndex < numberOfValues; ++writeIndex)
366 values[writeIndex] = value; 366 values[writeIndex] = value;
367 367
368 return value; 368 return value;
369 } 369 }
370 370
371 } // namespace WebCore 371 } // namespace WebCore
372 372
373 #endif // ENABLE(WEB_AUDIO) 373 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioParam.cpp ('k') | Source/modules/webaudio/AudioProcessingEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698