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

Unified Diff: remoting/codec/audio_encoder_opus.cc

Issue 1542203002: Switch to standard integer types in remoting/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-remoting-host
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/codec/audio_encoder_opus.h ('k') | remoting/codec/audio_encoder_opus_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/codec/audio_encoder_opus.cc
diff --git a/remoting/codec/audio_encoder_opus.cc b/remoting/codec/audio_encoder_opus.cc
index 315fb9ff2c12b13d8fb440aa15718dd8c764bdd7..547ef50c5b84f39d8cee712a75f8986f95f02a92 100644
--- a/remoting/codec/audio_encoder_opus.cc
+++ b/remoting/codec/audio_encoder_opus.cc
@@ -86,8 +86,7 @@ void AudioEncoderOpus::InitEncoder() {
leftover_samples_ = 0;
leftover_buffer_size_ =
frame_size_ + media::SincResampler::kDefaultRequestSize;
- leftover_buffer_.reset(
- new int16[leftover_buffer_size_ * channels_]);
+ leftover_buffer_.reset(new int16_t[leftover_buffer_size_ * channels_]);
}
void AudioEncoderOpus::DestroyEncoder() {
@@ -150,8 +149,8 @@ scoped_ptr<AudioPacket> AudioEncoderOpus::Encode(
}
int samples_in_packet = packet->data(0).size() / kBytesPerSample / channels_;
- const int16* next_sample =
- reinterpret_cast<const int16*>(packet->data(0).data());
+ const int16_t* next_sample =
+ reinterpret_cast<const int16_t*>(packet->data(0).data());
// Create a new packet of encoded data.
scoped_ptr<AudioPacket> encoded_packet(new AudioPacket());
@@ -164,7 +163,7 @@ scoped_ptr<AudioPacket> AudioEncoderOpus::Encode(
int samples_wanted = frame_size_ + prefetch_samples;
while (leftover_samples_ + samples_in_packet >= samples_wanted) {
- const int16* pcm_buffer = nullptr;
+ const int16_t* pcm_buffer = nullptr;
// Combine the packet with the leftover samples, if any.
if (leftover_samples_ > 0) {
@@ -188,7 +187,7 @@ scoped_ptr<AudioPacket> AudioEncoderOpus::Encode(
resampler_bus_->ToInterleaved(kFrameSamples, kBytesPerSample,
resample_buffer_.get());
- pcm_buffer = reinterpret_cast<int16*>(resample_buffer_.get());
+ pcm_buffer = reinterpret_cast<int16_t*>(resample_buffer_.get());
} else {
samples_consumed = frame_size_;
}
« no previous file with comments | « remoting/codec/audio_encoder_opus.h ('k') | remoting/codec/audio_encoder_opus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698