diff options
Diffstat (limited to 'media/audio/audio_input_controller.cc')
-rw-r--r-- | media/audio/audio_input_controller.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/media/audio/audio_input_controller.cc b/media/audio/audio_input_controller.cc index f94c0042..d64fb70 100644 --- a/media/audio/audio_input_controller.cc +++ b/media/audio/audio_input_controller.cc @@ -15,6 +15,9 @@ const int kMaxSamplesPerPacket = kMaxSampleRate; namespace media { +// static +AudioInputController::Factory* AudioInputController::factory_ = NULL; + AudioInputController::AudioInputController(EventHandler* handler) : handler_(handler), stream_(NULL), @@ -40,6 +43,11 @@ scoped_refptr<AudioInputController> AudioInputController::Create( (samples_per_packet > kMaxSamplesPerPacket) || (samples_per_packet < 0)) return NULL; + if (factory_) { + return factory_->Create(event_handler, format, channels, sample_rate, + bits_per_sample, samples_per_packet); + } + scoped_refptr<AudioInputController> controller = new AudioInputController( event_handler); |