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

Side by Side Diff: webrtc/modules/audio_device/android/audio_track_jni.cc

Issue 2534683002: RTC_[D]CHECK_op: Remove superfluous casts (Closed)
Patch Set: test Created 4 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 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (!audio_device_buffer_) { 248 if (!audio_device_buffer_) {
249 ALOGE("AttachAudioBuffer has not been called!"); 249 ALOGE("AttachAudioBuffer has not been called!");
250 return; 250 return;
251 } 251 }
252 // Pull decoded data (in 16-bit PCM format) from jitter buffer. 252 // Pull decoded data (in 16-bit PCM format) from jitter buffer.
253 int samples = audio_device_buffer_->RequestPlayoutData(frames_per_buffer_); 253 int samples = audio_device_buffer_->RequestPlayoutData(frames_per_buffer_);
254 if (samples <= 0) { 254 if (samples <= 0) {
255 ALOGE("AudioDeviceBuffer::RequestPlayoutData failed!"); 255 ALOGE("AudioDeviceBuffer::RequestPlayoutData failed!");
256 return; 256 return;
257 } 257 }
258 RTC_DCHECK_EQ(static_cast<size_t>(samples), frames_per_buffer_); 258 RTC_DCHECK_EQ(samples, frames_per_buffer_);
259 // Copy decoded data into common byte buffer to ensure that it can be 259 // Copy decoded data into common byte buffer to ensure that it can be
260 // written to the Java based audio track. 260 // written to the Java based audio track.
261 samples = audio_device_buffer_->GetPlayoutData(direct_buffer_address_); 261 samples = audio_device_buffer_->GetPlayoutData(direct_buffer_address_);
262 RTC_DCHECK_EQ(length, bytes_per_frame * samples); 262 RTC_DCHECK_EQ(length, bytes_per_frame * samples);
263 } 263 }
264 264
265 } // namespace webrtc 265 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698