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

Side by Side Diff: media/audio/audio_low_latency_input_output_unittest.cc

Issue 9580038: Convert uses of int ms to TimeDelta in media/audio. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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 | « media/audio/audio_input_unittest.cc ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « media/audio/audio_input_unittest.cc ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698