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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/GainNode.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) 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // FIXME: this can go away when we do mixing with gain directly in summing 108 // FIXME: this can go away when we do mixing with gain directly in summing
109 // junction of AudioNodeInput 109 // junction of AudioNodeInput
110 // 110 //
111 // As soon as we know the channel count of our input, we can lazily initialize. 111 // As soon as we know the channel count of our input, we can lazily initialize.
112 // Sometimes this may be called more than once with different channel counts, in 112 // Sometimes this may be called more than once with different channel counts, in
113 // which case we must safely uninitialize and then re-initialize with the new 113 // which case we must safely uninitialize and then re-initialize with the new
114 // channel count. 114 // channel count.
115 void GainHandler::CheckNumberOfChannelsForInput(AudioNodeInput* input) { 115 void GainHandler::CheckNumberOfChannelsForInput(AudioNodeInput* input) {
116 DCHECK(Context()->IsAudioThread()); 116 DCHECK(Context()->IsAudioThread());
117 ASSERT(Context()->IsGraphOwner()); 117 DCHECK(Context()->IsGraphOwner());
118 118
119 DCHECK(input); 119 DCHECK(input);
120 DCHECK_EQ(input, &this->Input(0)); 120 DCHECK_EQ(input, &this->Input(0));
121 if (input != &this->Input(0)) 121 if (input != &this->Input(0))
122 return; 122 return;
123 123
124 unsigned number_of_channels = input->NumberOfChannels(); 124 unsigned number_of_channels = input->NumberOfChannels();
125 125
126 if (IsInitialized() && number_of_channels != Output(0).NumberOfChannels()) { 126 if (IsInitialized() && number_of_channels != Output(0).NumberOfChannels()) {
127 // We're already initialized but the channel count has changed. 127 // We're already initialized but the channel count has changed.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 AudioParam* GainNode::gain() const { 178 AudioParam* GainNode::gain() const {
179 return gain_; 179 return gain_;
180 } 180 }
181 181
182 DEFINE_TRACE(GainNode) { 182 DEFINE_TRACE(GainNode) {
183 visitor->Trace(gain_); 183 visitor->Trace(gain_);
184 AudioNode::Trace(visitor); 184 AudioNode::Trace(visitor);
185 } 185 }
186 186
187 } // namespace blink 187 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698