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

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

Issue 1297673004: Fix typo in comment. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « no previous file | 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) 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 for (; writeIndex < fillToFrame; ++writeIndex) 445 for (; writeIndex < fillToFrame; ++writeIndex)
446 values[writeIndex] = value; 446 values[writeIndex] = value;
447 break; 447 break;
448 } 448 }
449 449
450 // Save old values and recalculate information based on the curve's duration 450 // Save old values and recalculate information based on the curve's duration
451 // instead of the next event time. 451 // instead of the next event time.
452 unsigned nextEventFillToFrame = fillToFrame; 452 unsigned nextEventFillToFrame = fillToFrame;
453 double nextEventFillToTime = fillToTime; 453 double nextEventFillToTime = fillToTime;
454 fillToTime = std::min(endTime, time1 + duration); 454 fillToTime = std::min(endTime, time1 + duration);
455 // |fillToTime| can be greater than |startTime| when the end of the 455 // |fillToTime| can be less than |startTime| when the end of the
456 // setValueCurve automation has been reached, but the next a utomation has not 456 // setValueCurve automation has been reached, but the next a utomation has not
457 // yet started. In this case, |fillToTime| is clipped to |ti me1|+|duration| 457 // yet started. In this case, |fillToTime| is clipped to |ti me1|+|duration|
458 // above, but |startTime| will keep increasing (because the current time is 458 // above, but |startTime| will keep increasing (because the current time is
459 // increasing). 459 // increasing).
460 fillToFrame = AudioUtilities::timeToSampleFrame(std::max(0.0 , fillToTime - startTime), sampleRate); 460 fillToFrame = AudioUtilities::timeToSampleFrame(std::max(0.0 , fillToTime - startTime), sampleRate);
461 fillToFrame = std::min(fillToFrame, numberOfValues); 461 fillToFrame = std::min(fillToFrame, numberOfValues);
462 462
463 // Index into the curve data using a floating-point value. 463 // Index into the curve data using a floating-point value.
464 // We're scaling the number of curve points by the duration (see curvePointsPerFrame). 464 // We're scaling the number of curve points by the duration (see curvePointsPerFrame).
465 double curveVirtualIndex = 0; 465 double curveVirtualIndex = 0;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 // to the end of the values buffer. 524 // to the end of the values buffer.
525 for (; writeIndex < numberOfValues; ++writeIndex) 525 for (; writeIndex < numberOfValues; ++writeIndex)
526 values[writeIndex] = value; 526 values[writeIndex] = value;
527 527
528 return value; 528 return value;
529 } 529 }
530 530
531 } // namespace blink 531 } // namespace blink
532 532
533 #endif // ENABLE(WEB_AUDIO) 533 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698