| 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 "media/audio/test_audio_input_controller_factory.h" | 5 #include "media/audio/test_audio_input_controller_factory.h" |
| 6 #include "media/audio/audio_file_writer.h" | |
| 7 #include "media/audio/audio_io.h" | 6 #include "media/audio/audio_io.h" |
| 8 | 7 |
| 9 namespace media { | 8 namespace media { |
| 10 | 9 |
| 11 TestAudioInputController::TestAudioInputController( | 10 TestAudioInputController::TestAudioInputController( |
| 12 TestAudioInputControllerFactory* factory, | 11 TestAudioInputControllerFactory* factory, |
| 13 AudioManager* audio_manager, | 12 AudioManager* audio_manager, |
| 14 const AudioParameters& audio_parameters, | 13 const AudioParameters& audio_parameters, |
| 15 EventHandler* event_handler, | 14 EventHandler* event_handler, |
| 16 SyncWriter* sync_writer, | 15 SyncWriter* sync_writer, |
| 17 UserInputMonitor* user_input_monitor, | 16 UserInputMonitor* user_input_monitor, |
| 18 StreamType type) | 17 StreamType type) |
| 19 : AudioInputController(audio_manager->GetTaskRunner(), | 18 : AudioInputController(audio_manager->GetTaskRunner(), |
| 20 event_handler, | 19 event_handler, |
| 21 sync_writer, | 20 sync_writer, |
| 22 nullptr, | |
| 23 user_input_monitor, | 21 user_input_monitor, |
| 24 type), | 22 audio_parameters, |
| 23 type, |
| 24 audio_manager->GetTaskRunner()), |
| 25 audio_parameters_(audio_parameters), | 25 audio_parameters_(audio_parameters), |
| 26 factory_(factory), | 26 factory_(factory), |
| 27 event_handler_(event_handler), | 27 event_handler_(event_handler), |
| 28 sync_writer_(sync_writer) {} | 28 sync_writer_(sync_writer) {} |
| 29 | 29 |
| 30 TestAudioInputController::~TestAudioInputController() { | 30 TestAudioInputController::~TestAudioInputController() { |
| 31 // Inform the factory so that it allows creating new instances in future. | 31 // Inform the factory so that it allows creating new instances in future. |
| 32 factory_->OnTestAudioInputControllerDestroyed(this); | 32 factory_->OnTestAudioInputControllerDestroyed(this); |
| 33 } | 33 } |
| 34 | 34 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return controller_; | 67 return controller_; |
| 68 } | 68 } |
| 69 | 69 |
| 70 void TestAudioInputControllerFactory::OnTestAudioInputControllerDestroyed( | 70 void TestAudioInputControllerFactory::OnTestAudioInputControllerDestroyed( |
| 71 TestAudioInputController* controller) { | 71 TestAudioInputController* controller) { |
| 72 DCHECK_EQ(controller_, controller); | 72 DCHECK_EQ(controller_, controller); |
| 73 controller_ = NULL; | 73 controller_ = NULL; |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace media | 76 } // namespace media |
| OLD | NEW |