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

Side by Side Diff: webrtc/voice_engine/utility.h

Issue 1224163002: Update audio code to use size_t more correctly, webrtc/voice_engine/ portion. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Checkpoint Created 5 years, 5 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 24 matching lines...) Expand all
35 // Downmix and downsample the audio in |src_data| to |dst_af| as necessary, 35 // Downmix and downsample the audio in |src_data| to |dst_af| as necessary,
36 // specified by |codec_num_channels| and |codec_rate_hz|. |mono_buffer| is 36 // specified by |codec_num_channels| and |codec_rate_hz|. |mono_buffer| is
37 // temporary space and must be of sufficient size to hold the downmixed source 37 // temporary space and must be of sufficient size to hold the downmixed source
38 // audio (recommend using a size of kMaxMonoDataSizeSamples). 38 // audio (recommend using a size of kMaxMonoDataSizeSamples).
39 // 39 //
40 // |dst_af| will have its data and format members (sample rate, channels and 40 // |dst_af| will have its data and format members (sample rate, channels and
41 // samples per channel) set appropriately. No other members will be changed. 41 // samples per channel) set appropriately. No other members will be changed.
42 // TODO(ajm): For now, this still calls Reset() on |dst_af|. Remove this, as 42 // TODO(ajm): For now, this still calls Reset() on |dst_af|. Remove this, as
43 // it shouldn't be needed. 43 // it shouldn't be needed.
44 void DownConvertToCodecFormat(const int16_t* src_data, 44 void DownConvertToCodecFormat(const int16_t* src_data,
45 int samples_per_channel, 45 size_t samples_per_channel,
46 int num_channels, 46 int num_channels,
47 int sample_rate_hz, 47 int sample_rate_hz,
48 int codec_num_channels, 48 int codec_num_channels,
49 int codec_rate_hz, 49 int codec_rate_hz,
50 int16_t* mono_buffer, 50 int16_t* mono_buffer,
51 PushResampler<int16_t>* resampler, 51 PushResampler<int16_t>* resampler,
52 AudioFrame* dst_af); 52 AudioFrame* dst_af);
53 53
54 void MixWithSat(int16_t target[], 54 void MixWithSat(int16_t target[],
55 int target_channel, 55 int target_channel,
56 const int16_t source[], 56 const int16_t source[],
57 int source_channel, 57 int source_channel,
58 int source_len); 58 size_t source_len);
59 59
60 } // namespace voe 60 } // namespace voe
61 } // namespace webrtc 61 } // namespace webrtc
62 62
63 #endif // WEBRTC_VOICE_ENGINE_UTILITY_H_ 63 #endif // WEBRTC_VOICE_ENGINE_UTILITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698