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

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

Issue 2809023002: Replace ASSERT/ASSERT_NOT_REACHED with DCHECK/NOTREACHED in modules/webaudio (Closed)
Patch Set: Created 3 years, 8 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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 case ParamEvent::kSetValueCurve: 104 case ParamEvent::kSetValueCurve:
105 s = "setValueCurveAtTime"; 105 s = "setValueCurveAtTime";
106 // Replace the default arg, using "..." to denote the curve argument. 106 // Replace the default arg, using "..." to denote the curve argument.
107 args = "..., " + String::Number(event.Time(), 16) + ", " + 107 args = "..., " + String::Number(event.Time(), 16) + ", " +
108 String::Number(event.Duration(), 16); 108 String::Number(event.Duration(), 16);
109 break; 109 break;
110 case ParamEvent::kCancelValues: 110 case ParamEvent::kCancelValues:
111 // Fall through; we should never have to print out the internal 111 // Fall through; we should never have to print out the internal
112 // CancelValues event. 112 // CancelValues event.
113 case ParamEvent::kLastType: 113 case ParamEvent::kLastType:
114 ASSERT_NOT_REACHED(); 114 NOTREACHED();
115 break; 115 break;
116 }; 116 };
117 117
118 return s + "(" + args + ")"; 118 return s + "(" + args + ")";
119 } 119 }
120 120
121 // Computes the value of a linear ramp event at time t with the given event 121 // Computes the value of a linear ramp event at time t with the given event
122 // parameters. 122 // parameters.
123 float AudioParamTimeline::LinearRampAtTime(double t, 123 float AudioParamTimeline::LinearRampAtTime(double t,
124 float value1, 124 float value1,
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 current_state, values, current_frame, value, write_index); 967 current_state, values, current_frame, value, write_index);
968 break; 968 break;
969 } 969 }
970 970
971 case ParamEvent::kSetValueCurve: { 971 case ParamEvent::kSetValueCurve: {
972 std::tie(current_frame, value, write_index) = ProcessSetValueCurve( 972 std::tie(current_frame, value, write_index) = ProcessSetValueCurve(
973 current_state, values, current_frame, value, write_index); 973 current_state, values, current_frame, value, write_index);
974 break; 974 break;
975 } 975 }
976 case ParamEvent::kLastType: 976 case ParamEvent::kLastType:
977 ASSERT_NOT_REACHED(); 977 NOTREACHED();
978 break; 978 break;
979 } 979 }
980 } 980 }
981 } 981 }
982 982
983 // If we skipped over any events (because they are in the past), we can 983 // If we skipped over any events (because they are in the past), we can
984 // remove them so we don't have to check them ever again. (This MUST be 984 // remove them so we don't have to check them ever again. (This MUST be
985 // running with the m_events lock so we can safely modify the m_events 985 // running with the m_events lock so we can safely modify the m_events
986 // array.) 986 // array.)
987 if (last_skipped_event_index > 0) 987 if (last_skipped_event_index > 0)
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1776 unsigned write_index) { 1776 unsigned write_index) {
1777 size_t index = write_index; 1777 size_t index = write_index;
1778 1778
1779 for (; index < end_frame; ++index) 1779 for (; index < end_frame; ++index)
1780 values[index] = default_value; 1780 values[index] = default_value;
1781 1781
1782 return index; 1782 return index;
1783 } 1783 }
1784 1784
1785 } // namespace blink 1785 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698