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

Side by Side Diff: webrtc/common_audio/audio_util.cc

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync 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
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 23 matching lines...) Expand all
34 dest[i] = FloatToFloatS16(src[i]); 34 dest[i] = FloatToFloatS16(src[i]);
35 } 35 }
36 36
37 void FloatS16ToFloat(const float* src, size_t size, float* dest) { 37 void FloatS16ToFloat(const float* src, size_t size, float* dest) {
38 for (size_t i = 0; i < size; ++i) 38 for (size_t i = 0; i < size; ++i)
39 dest[i] = FloatS16ToFloat(src[i]); 39 dest[i] = FloatS16ToFloat(src[i]);
40 } 40 }
41 41
42 template <> 42 template <>
43 void DownmixInterleavedToMono<int16_t>(const int16_t* interleaved, 43 void DownmixInterleavedToMono<int16_t>(const int16_t* interleaved,
44 int num_frames, 44 size_t num_frames,
45 int num_channels, 45 int num_channels,
46 int16_t* deinterleaved) { 46 int16_t* deinterleaved) {
47 DownmixInterleavedToMonoImpl<int16_t, int32_t>(interleaved, num_frames, 47 DownmixInterleavedToMonoImpl<int16_t, int32_t>(interleaved, num_frames,
48 num_channels, deinterleaved); 48 num_channels, deinterleaved);
49 } 49 }
50 50
51 } // namespace webrtc 51 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/common_audio/audio_ring_buffer_unittest.cc ('k') | webrtc/common_audio/audio_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698