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

Side by Side Diff: webrtc/modules/audio_device/dummy/file_audio_device.cc

Issue 1316523002: Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix compile 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 #include "webrtc/base/platform_thread.h" 10 #include "webrtc/base/platform_thread.h"
11 #include "webrtc/modules/audio_device/dummy/file_audio_device.h" 11 #include "webrtc/modules/audio_device/dummy/file_audio_device.h"
12 #include "webrtc/system_wrappers/include/sleep.h" 12 #include "webrtc/system_wrappers/include/sleep.h"
13 13
14 namespace webrtc { 14 namespace webrtc {
15 15
16 const int kRecordingFixedSampleRate = 48000; 16 const int kRecordingFixedSampleRate = 48000;
17 const int kRecordingNumChannels = 2; 17 const size_t kRecordingNumChannels = 2;
18 const int kPlayoutFixedSampleRate = 48000; 18 const int kPlayoutFixedSampleRate = 48000;
19 const int kPlayoutNumChannels = 2; 19 const size_t kPlayoutNumChannels = 2;
20 const size_t kPlayoutBufferSize = 20 const size_t kPlayoutBufferSize =
21 kPlayoutFixedSampleRate / 100 * kPlayoutNumChannels * 2; 21 kPlayoutFixedSampleRate / 100 * kPlayoutNumChannels * 2;
22 const size_t kRecordingBufferSize = 22 const size_t kRecordingBufferSize =
23 kRecordingFixedSampleRate / 100 * kRecordingNumChannels * 2; 23 kRecordingFixedSampleRate / 100 * kRecordingNumChannels * 2;
24 24
25 FileAudioDevice::FileAudioDevice(const int32_t id, 25 FileAudioDevice::FileAudioDevice(const int32_t id,
26 const char* inputFilename, 26 const char* inputFilename,
27 const char* outputFilename): 27 const char* outputFilename):
28 _ptrAudioBuffer(NULL), 28 _ptrAudioBuffer(NULL),
29 _recordingBuffer(NULL), 29 _recordingBuffer(NULL),
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 uint64_t deltaTimeMillis = _clock->CurrentNtpInMilliseconds() - currentTime; 537 uint64_t deltaTimeMillis = _clock->CurrentNtpInMilliseconds() - currentTime;
538 if(deltaTimeMillis < 10) { 538 if(deltaTimeMillis < 10) {
539 SleepMs(10 - deltaTimeMillis); 539 SleepMs(10 - deltaTimeMillis);
540 } 540 }
541 541
542 return true; 542 return true;
543 } 543 }
544 544
545 } // namespace webrtc 545 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/audio_device_buffer.cc ('k') | webrtc/modules/audio_device/include/audio_device_defines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698