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

Unified Diff: webrtc/modules/audio_device/dummy/file_audio_device.cc

Issue 1534193008: Misc. small cleanups (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Unnecessary parens Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/dummy/file_audio_device.cc
diff --git a/webrtc/modules/audio_device/dummy/file_audio_device.cc b/webrtc/modules/audio_device/dummy/file_audio_device.cc
index ea432af203be16dfe905af421a72efe695a66878..ea61ce64a7072af25a7e881b26e491972b8f5c2d 100644
--- a/webrtc/modules/audio_device/dummy/file_audio_device.cc
+++ b/webrtc/modules/audio_device/dummy/file_audio_device.cc
@@ -17,10 +17,10 @@ const int kRecordingFixedSampleRate = 48000;
const int kRecordingNumChannels = 2;
const int kPlayoutFixedSampleRate = 48000;
const int kPlayoutNumChannels = 2;
-const int kPlayoutBufferSize = kPlayoutFixedSampleRate / 100
- * kPlayoutNumChannels * 2;
-const int kRecordingBufferSize = kRecordingFixedSampleRate / 100
- * kRecordingNumChannels * 2;
+const size_t kPlayoutBufferSize =
+ kPlayoutFixedSampleRate / 100 * kPlayoutNumChannels * 2;
+const size_t kRecordingBufferSize =
+ kRecordingFixedSampleRate / 100 * kRecordingNumChannels * 2;
FileAudioDevice::FileAudioDevice(const int32_t id,
const char* inputFilename,
@@ -194,9 +194,7 @@ int32_t FileAudioDevice::StartPlayout() {
_playoutFramesLeft = 0;
if (!_playoutBuffer) {
- _playoutBuffer = new int8_t[2 *
- kPlayoutNumChannels *
- kPlayoutFixedSampleRate/100];
+ _playoutBuffer = new int8_t[kPlayoutBufferSize];
}
if (!_playoutBuffer) {
_playing = false;
« no previous file with comments | « webrtc/modules/audio_coding/test/opus_test.cc ('k') | webrtc/modules/audio_device/test/audio_device_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698