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

Issue 1228823003: Update audio code to use size_t more correctly, webrtc/modules/audio_device/ (Closed)

Created:
5 years, 5 months ago by Peter Kasting
Modified:
5 years, 4 months ago
Reviewers:
henrika_webrtc
CC:
webrtc-reviews_webrtc.org
Base URL:
https://chromium.googlesource.com/external/webrtc@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Update audio code to use size_t more correctly, webrtc/modules/audio_device/ portion. This is a piece of https://codereview.webrtc.org/1230503003 , split out to a separate change to make reviewing easier. BUG=chromium:81439 TEST=none

Patch Set 1 #

Patch Set 2 : Resync #

Patch Set 3 : Checkpoint #

Total comments: 4

Patch Set 4 : Review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -111 lines) Patch
M webrtc/modules/audio_device/android/audio_device_unittest.cc View 1 19 chunks +39 lines, -36 lines 0 comments Download
M webrtc/modules/audio_device/android/audio_manager_unittest.cc View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M webrtc/modules/audio_device/android/audio_record_jni.cc View 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_device/audio_device_buffer.h View 4 chunks +9 lines, -9 lines 0 comments Download
M webrtc/modules/audio_device/audio_device_buffer.cc View 1 6 chunks +7 lines, -6 lines 0 comments Download
M webrtc/modules/audio_device/dummy/file_audio_device.h View 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_device/dummy/file_audio_device.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_device/include/audio_device_defines.h View 1 2 10 chunks +16 lines, -14 lines 0 comments Download
M webrtc/modules/audio_device/mock_audio_device_buffer.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_device/test/audio_device_test_api.cc View 4 chunks +8 lines, -8 lines 0 comments Download
M webrtc/modules/audio_device/test/func_test_manager.h View 5 chunks +10 lines, -10 lines 0 comments Download
M webrtc/modules/audio_device/test/func_test_manager.cc View 11 chunks +17 lines, -17 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Peter Kasting
5 years, 5 months ago (2015-07-23 20:30:18 UTC) #2
henrika_webrtc
LGTM with question. FYI: will be OOO for the coming three weeks.
5 years, 5 months ago (2015-07-24 10:42:49 UTC) #3
henrika_webrtc
https://codereview.webrtc.org/1228823003/diff/40001/webrtc/modules/audio_device/dummy/file_audio_device.cc File webrtc/modules/audio_device/dummy/file_audio_device.cc (right): https://codereview.webrtc.org/1228823003/diff/40001/webrtc/modules/audio_device/dummy/file_audio_device.cc#newcode175 webrtc/modules/audio_device/dummy/file_audio_device.cc:175: _recordingFramesIn10MS = static_cast<size_t>(kRecordingFixedSampleRate/100); nit, (kRecordingFixedSampleRate / 100) https://codereview.webrtc.org/1228823003/diff/40001/webrtc/modules/audio_device/include/audio_device_defines.h File ...
5 years, 5 months ago (2015-07-24 10:43:04 UTC) #4
Peter Kasting
5 years, 4 months ago (2015-07-27 23:28:02 UTC) #5
https://codereview.webrtc.org/1228823003/diff/40001/webrtc/modules/audio_devi...
File webrtc/modules/audio_device/dummy/file_audio_device.cc (right):

https://codereview.webrtc.org/1228823003/diff/40001/webrtc/modules/audio_devi...
webrtc/modules/audio_device/dummy/file_audio_device.cc:175:
_recordingFramesIn10MS = static_cast<size_t>(kRecordingFixedSampleRate/100);
On 2015/07/24 10:43:04, henrika_webrtc wrote:
> nit, (kRecordingFixedSampleRate / 100)

Done.

https://codereview.webrtc.org/1228823003/diff/40001/webrtc/modules/audio_devi...
File webrtc/modules/audio_device/include/audio_device_defines.h (right):

https://codereview.webrtc.org/1228823003/diff/40001/webrtc/modules/audio_devi...
webrtc/modules/audio_device/include/audio_device_defines.h:188: size_t
frames_per_10ms_buffer_;
On 2015/07/24 10:43:04, henrika_webrtc wrote:
> I have asked a similar question before but it is not clear to me why
> frames_per_10ms_buffer_ should be size_t but not frames_per_buffer_. What is
the
> difference?

The answer is that fixing |frames_per_10ms_buffer_| was required to get the rest
of my CL to compile whereas fixing |frames_per_buffer_| wasn't.

In principle, both should be size_t.  This just doesn't bother to convert the
other variable yet.  I can stick that in my set of things to convert in the next
pass.

Powered by Google App Engine
This is Rietveld 408576698