| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/environment.h" | 6 #include "base/environment.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 DLOG(INFO) << " samples_per_packet: " << aisw.samples_per_packet(); | 435 DLOG(INFO) << " samples_per_packet: " << aisw.samples_per_packet(); |
| 436 DLOG(INFO) << " channels : " << aisw.channels(); | 436 DLOG(INFO) << " channels : " << aisw.channels(); |
| 437 | 437 |
| 438 ais->Start(&full_duplex); | 438 ais->Start(&full_duplex); |
| 439 aos->Start(&full_duplex); | 439 aos->Start(&full_duplex); |
| 440 | 440 |
| 441 // Wait for approximately 10 seconds. The user shall hear his own voice | 441 // Wait for approximately 10 seconds. The user shall hear his own voice |
| 442 // in loop back during this time. At the same time, delay recordings are | 442 // in loop back during this time. At the same time, delay recordings are |
| 443 // performed and stored in the output text file. | 443 // performed and stored in the output text file. |
| 444 message_loop()->PostDelayedTask(FROM_HERE, | 444 message_loop()->PostDelayedTask(FROM_HERE, |
| 445 MessageLoop::QuitClosure(), TestTimeouts::action_timeout_ms()); | 445 MessageLoop::QuitClosure(), TestTimeouts::action_timeout()); |
| 446 message_loop()->Run(); | 446 message_loop()->Run(); |
| 447 | 447 |
| 448 aos->Stop(); | 448 aos->Stop(); |
| 449 ais->Stop(); | 449 ais->Stop(); |
| 450 | 450 |
| 451 // All Close() operations that run on the mocked audio thread, | 451 // All Close() operations that run on the mocked audio thread, |
| 452 // should be synchronous and not post additional close tasks to | 452 // should be synchronous and not post additional close tasks to |
| 453 // mocked the audio thread. Hence, there is no need to call | 453 // mocked the audio thread. Hence, there is no need to call |
| 454 // message_loop()->RunAllPending() after the Close() methods. | 454 // message_loop()->RunAllPending() after the Close() methods. |
| 455 aos->Close(); | 455 aos->Close(); |
| 456 ais->Close(); | 456 ais->Close(); |
| 457 } | 457 } |
| OLD | NEW |