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

Side by Side Diff: webrtc/common_audio/include/audio_util.h

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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
« no previous file with comments | « webrtc/common_audio/channel_buffer.h ('k') | webrtc/common_audio/lapped_transform.cc » ('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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 } 148 }
149 149
150 // Downmixes an interleaved multichannel signal to a single channel by averaging 150 // Downmixes an interleaved multichannel signal to a single channel by averaging
151 // all channels. 151 // all channels.
152 template <typename T, typename Intermediate> 152 template <typename T, typename Intermediate>
153 void DownmixInterleavedToMonoImpl(const T* interleaved, 153 void DownmixInterleavedToMonoImpl(const T* interleaved,
154 size_t num_frames, 154 size_t num_frames,
155 int num_channels, 155 int num_channels,
156 T* deinterleaved) { 156 T* deinterleaved) {
157 DCHECK_GT(num_channels, 0); 157 RTC_DCHECK_GT(num_channels, 0);
158 DCHECK_GT(num_frames, 0u); 158 RTC_DCHECK_GT(num_frames, 0u);
159 159
160 const T* const end = interleaved + num_frames * num_channels; 160 const T* const end = interleaved + num_frames * num_channels;
161 161
162 while (interleaved < end) { 162 while (interleaved < end) {
163 const T* const frame_end = interleaved + num_channels; 163 const T* const frame_end = interleaved + num_channels;
164 164
165 Intermediate value = *interleaved++; 165 Intermediate value = *interleaved++;
166 while (interleaved < frame_end) { 166 while (interleaved < frame_end) {
167 value += *interleaved++; 167 value += *interleaved++;
168 } 168 }
(...skipping 10 matching lines...) Expand all
179 179
180 template <> 180 template <>
181 void DownmixInterleavedToMono<int16_t>(const int16_t* interleaved, 181 void DownmixInterleavedToMono<int16_t>(const int16_t* interleaved,
182 size_t num_frames, 182 size_t num_frames,
183 int num_channels, 183 int num_channels,
184 int16_t* deinterleaved); 184 int16_t* deinterleaved);
185 185
186 } // namespace webrtc 186 } // namespace webrtc
187 187
188 #endif // WEBRTC_COMMON_AUDIO_INCLUDE_AUDIO_UTIL_H_ 188 #endif // WEBRTC_COMMON_AUDIO_INCLUDE_AUDIO_UTIL_H_
OLDNEW
« no previous file with comments | « webrtc/common_audio/channel_buffer.h ('k') | webrtc/common_audio/lapped_transform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698