| 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 <windows.h> | 5 #include <windows.h> |
| 6 #include <mmsystem.h> | 6 #include <mmsystem.h> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 const char* file_name = "out_stereo_10sec.pcm"; | 389 const char* file_name = "out_stereo_10sec.pcm"; |
| 390 | 390 |
| 391 AudioInputStreamWrapper aisw(audio_manager.get()); | 391 AudioInputStreamWrapper aisw(audio_manager.get()); |
| 392 AudioInputStream* ais = aisw.Create(); | 392 AudioInputStream* ais = aisw.Create(); |
| 393 EXPECT_TRUE(ais->Open()); | 393 EXPECT_TRUE(ais->Open()); |
| 394 | 394 |
| 395 LOG(INFO) << ">> Sample rate: " << aisw.sample_rate() << " [Hz]"; | 395 LOG(INFO) << ">> Sample rate: " << aisw.sample_rate() << " [Hz]"; |
| 396 WriteToFileAudioSink file_sink(file_name); | 396 WriteToFileAudioSink file_sink(file_name); |
| 397 LOG(INFO) << ">> Speak into the default microphone while recording."; | 397 LOG(INFO) << ">> Speak into the default microphone while recording."; |
| 398 ais->Start(&file_sink); | 398 ais->Start(&file_sink); |
| 399 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms()); | 399 base::PlatformThread::Sleep(TestTimeouts::action_timeout()); |
| 400 ais->Stop(); | 400 ais->Stop(); |
| 401 LOG(INFO) << ">> Recording has stopped."; | 401 LOG(INFO) << ">> Recording has stopped."; |
| 402 ais->Close(); | 402 ais->Close(); |
| 403 } | 403 } |
| 404 | 404 |
| 405 } // namespace media | 405 } // namespace media |
| OLD | NEW |