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 a2eac8767389fd702e576832cf0d99e598a27f1d..e32e2c6b77fd44dd62edc7277be5737fa0db39d4 100644 |
--- a/webrtc/modules/audio_device/dummy/file_audio_device.cc |
+++ b/webrtc/modules/audio_device/dummy/file_audio_device.cc |
@@ -15,13 +15,13 @@ |
namespace webrtc { |
int kRecordingFixedSampleRate = 48000; |
-int kRecordingNumChannels = 2; |
+size_t kRecordingNumChannels = 2; |
int kPlayoutFixedSampleRate = 48000; |
-int kPlayoutNumChannels = 2; |
-int kPlayoutBufferSize = kPlayoutFixedSampleRate / 100 |
- * kPlayoutNumChannels * 2; |
-int kRecordingBufferSize = kRecordingFixedSampleRate / 100 |
- * kRecordingNumChannels * 2; |
+size_t kPlayoutNumChannels = 2; |
+size_t kPlayoutBufferSize = |
+ kPlayoutFixedSampleRate / 100 * kPlayoutNumChannels * 2; |
+size_t kRecordingBufferSize = |
+ kRecordingFixedSampleRate / 100 * kRecordingNumChannels * 2; |
FileAudioDevice::FileAudioDevice(const int32_t id, |
const char* inputFilename, |
@@ -195,9 +195,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; |