| OLD | NEW |
| 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 #ifndef WEBRTC_TEST_FAKE_AUDIO_DEVICE_H_ | 10 #ifndef WEBRTC_TEST_FAKE_AUDIO_DEVICE_H_ |
| 11 #define WEBRTC_TEST_FAKE_AUDIO_DEVICE_H_ | 11 #define WEBRTC_TEST_FAKE_AUDIO_DEVICE_H_ |
| 12 | 12 |
| 13 #include <memory> |
| 13 #include <string> | 14 #include <string> |
| 14 | 15 |
| 15 #include "webrtc/base/criticalsection.h" | 16 #include "webrtc/base/criticalsection.h" |
| 16 #include "webrtc/base/platform_thread.h" | 17 #include "webrtc/base/platform_thread.h" |
| 17 #include "webrtc/base/scoped_ptr.h" | 18 #include "webrtc/base/scoped_ptr.h" |
| 18 #include "webrtc/modules/audio_device/include/fake_audio_device.h" | 19 #include "webrtc/modules/audio_device/include/fake_audio_device.h" |
| 19 #include "webrtc/test/drifting_clock.h" | 20 #include "webrtc/test/drifting_clock.h" |
| 20 #include "webrtc/typedefs.h" | 21 #include "webrtc/typedefs.h" |
| 21 | 22 |
| 22 namespace webrtc { | 23 namespace webrtc { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 52 static const size_t kBufferSizeBytes = 2 * kFrequencyHz; | 53 static const size_t kBufferSizeBytes = 2 * kFrequencyHz; |
| 53 | 54 |
| 54 AudioTransport* audio_callback_; | 55 AudioTransport* audio_callback_; |
| 55 bool capturing_; | 56 bool capturing_; |
| 56 int8_t captured_audio_[kBufferSizeBytes]; | 57 int8_t captured_audio_[kBufferSizeBytes]; |
| 57 int8_t playout_buffer_[kBufferSizeBytes]; | 58 int8_t playout_buffer_[kBufferSizeBytes]; |
| 58 const float speed_; | 59 const float speed_; |
| 59 int64_t last_playout_ms_; | 60 int64_t last_playout_ms_; |
| 60 | 61 |
| 61 DriftingClock clock_; | 62 DriftingClock clock_; |
| 62 rtc::scoped_ptr<EventTimerWrapper> tick_; | 63 std::unique_ptr<EventTimerWrapper> tick_; |
| 63 rtc::CriticalSection lock_; | 64 rtc::CriticalSection lock_; |
| 64 rtc::PlatformThread thread_; | 65 rtc::PlatformThread thread_; |
| 65 rtc::scoped_ptr<ModuleFileUtility> file_utility_; | 66 std::unique_ptr<ModuleFileUtility> file_utility_; |
| 66 rtc::scoped_ptr<FileWrapper> input_stream_; | 67 std::unique_ptr<FileWrapper> input_stream_; |
| 67 }; | 68 }; |
| 68 } // namespace test | 69 } // namespace test |
| 69 } // namespace webrtc | 70 } // namespace webrtc |
| 70 | 71 |
| 71 #endif // WEBRTC_TEST_FAKE_AUDIO_DEVICE_H_ | 72 #endif // WEBRTC_TEST_FAKE_AUDIO_DEVICE_H_ |
| OLD | NEW |