Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t. This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects. This was be reviewed and approved in pieces: https://codereview.webrtc.org/1224093003 https://codereview.webrtc.org/1224123002 https://codereview.webrtc.org/1224163002 https://codereview.webrtc.org/1225133003 https://codereview.webrtc.org/1225173002 https://codereview.webrtc.org/1227163003 https://codereview.webrtc.org/1227203003 https://codereview.webrtc.org/1227213002 https://codereview.webrtc.org/1227893002 https://codereview.webrtc.org/1228793004 https://codereview.webrtc.org/1228803003 https://codereview.webrtc.org/1228823002 https://codereview.webrtc.org/1228823003 https://codereview.webrtc.org/1228843002 https://codereview.webrtc.org/1230693002 https://codereview.webrtc.org/1231713002 The change is being landed as TBR to all the folks who reviewed the above. BUG=chromium:81439 TEST=none R=andrew@webrtc.org, pbos@webrtc.org TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher Review URL: https://codereview.webrtc.org/1230503003 . Cr-Commit-Position: refs/heads/master@{#9768}
This commit is contained in:
@ -33,19 +33,19 @@ enum Band {
|
||||
class AudioBuffer {
|
||||
public:
|
||||
// TODO(ajm): Switch to take ChannelLayouts.
|
||||
AudioBuffer(int input_num_frames,
|
||||
AudioBuffer(size_t input_num_frames,
|
||||
int num_input_channels,
|
||||
int process_num_frames,
|
||||
size_t process_num_frames,
|
||||
int num_process_channels,
|
||||
int output_num_frames);
|
||||
size_t output_num_frames);
|
||||
virtual ~AudioBuffer();
|
||||
|
||||
int num_channels() const;
|
||||
void set_num_channels(int num_channels);
|
||||
int num_frames() const;
|
||||
int num_frames_per_band() const;
|
||||
int num_keyboard_frames() const;
|
||||
int num_bands() const;
|
||||
size_t num_frames() const;
|
||||
size_t num_frames_per_band() const;
|
||||
size_t num_keyboard_frames() const;
|
||||
size_t num_bands() const;
|
||||
|
||||
// Returns a pointer array to the full-band channels.
|
||||
// Usage:
|
||||
@ -127,20 +127,20 @@ class AudioBuffer {
|
||||
|
||||
// The audio is passed into DeinterleaveFrom() or CopyFrom() with input
|
||||
// format (samples per channel and number of channels).
|
||||
const int input_num_frames_;
|
||||
const size_t input_num_frames_;
|
||||
const int num_input_channels_;
|
||||
// The audio is stored by DeinterleaveFrom() or CopyFrom() with processing
|
||||
// format.
|
||||
const int proc_num_frames_;
|
||||
const size_t proc_num_frames_;
|
||||
const int num_proc_channels_;
|
||||
// The audio is returned by InterleaveTo() and CopyTo() with output samples
|
||||
// per channels and the current number of channels. This last one can be
|
||||
// changed at any time using set_num_channels().
|
||||
const int output_num_frames_;
|
||||
const size_t output_num_frames_;
|
||||
int num_channels_;
|
||||
|
||||
int num_bands_;
|
||||
int num_split_frames_;
|
||||
size_t num_bands_;
|
||||
size_t num_split_frames_;
|
||||
bool mixed_low_pass_valid_;
|
||||
bool reference_copied_;
|
||||
AudioFrame::VADActivity activity_;
|
||||
|
||||
Reference in New Issue
Block a user