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

Side by Side Diff: webrtc/test/fake_audio_device.cc

Issue 2054373002: FileWrapper[Impl] modifications and actually remove the "Impl" class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix use of ASSERT instead of ASSERT_TRUE in test Created 4 years, 6 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
« no previous file with comments | « webrtc/system_wrappers/system_wrappers.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10
(...skipping 21 matching lines...) Expand all
32 speed_(speed), 32 speed_(speed),
33 last_playout_ms_(-1), 33 last_playout_ms_(-1),
34 clock_(clock, speed), 34 clock_(clock, speed),
35 tick_(EventTimerWrapper::Create()), 35 tick_(EventTimerWrapper::Create()),
36 thread_(FakeAudioDevice::Run, this, "FakeAudioDevice"), 36 thread_(FakeAudioDevice::Run, this, "FakeAudioDevice"),
37 file_utility_(new ModuleFileUtility(0)), 37 file_utility_(new ModuleFileUtility(0)),
38 input_stream_(FileWrapper::Create()) { 38 input_stream_(FileWrapper::Create()) {
39 memset(captured_audio_, 0, sizeof(captured_audio_)); 39 memset(captured_audio_, 0, sizeof(captured_audio_));
40 memset(playout_buffer_, 0, sizeof(playout_buffer_)); 40 memset(playout_buffer_, 0, sizeof(playout_buffer_));
41 // Open audio input file as read-only and looping. 41 // Open audio input file as read-only and looping.
42 EXPECT_EQ(0, input_stream_->OpenFile(filename.c_str(), true, true)) 42 EXPECT_TRUE(input_stream_->OpenFile(filename.c_str(), true)) << filename;
43 << filename;
44 } 43 }
45 44
46 FakeAudioDevice::~FakeAudioDevice() { 45 FakeAudioDevice::~FakeAudioDevice() {
47 Stop(); 46 Stop();
48 47
49 thread_.Stop(); 48 thread_.Stop();
50 } 49 }
51 50
52 int32_t FakeAudioDevice::Init() { 51 int32_t FakeAudioDevice::Init() {
53 rtc::CritScope cs(&lock_); 52 rtc::CritScope cs(&lock_);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 rtc::CritScope cs(&lock_); 137 rtc::CritScope cs(&lock_);
139 capturing_ = true; 138 capturing_ = true;
140 } 139 }
141 140
142 void FakeAudioDevice::Stop() { 141 void FakeAudioDevice::Stop() {
143 rtc::CritScope cs(&lock_); 142 rtc::CritScope cs(&lock_);
144 capturing_ = false; 143 capturing_ = false;
145 } 144 }
146 } // namespace test 145 } // namespace test
147 } // namespace webrtc 146 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/system_wrappers.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698