Index: webrtc/api/localaudiosource.cc |
diff --git a/webrtc/api/localaudiosource.cc b/webrtc/api/localaudiosource.cc |
index a118655516b810e79d93529a35ced3c408c008a5..097d074058d4c5bacc113c4f950f68fb249cf78c 100644 |
--- a/webrtc/api/localaudiosource.cc |
+++ b/webrtc/api/localaudiosource.cc |
@@ -76,6 +76,15 @@ rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create( |
return source; |
} |
+rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create( |
+ const PeerConnectionFactoryInterface::Options& options, |
+ const cricket::AudioOptions* audio_options) { |
+ rtc::scoped_refptr<LocalAudioSource> source( |
+ new rtc::RefCountedObject<LocalAudioSource>()); |
+ source->Initialize(options, audio_options); |
+ return source; |
+} |
+ |
void LocalAudioSource::Initialize( |
const PeerConnectionFactoryInterface::Options& options, |
const MediaConstraintsInterface* constraints) { |
@@ -92,4 +101,14 @@ void LocalAudioSource::Initialize( |
source_state_ = kLive; |
} |
+void LocalAudioSource::Initialize( |
+ const PeerConnectionFactoryInterface::Options& options, |
+ const cricket::AudioOptions* audio_options) { |
+ if (!audio_options) |
+ return; |
+ |
+ options_ = *audio_options; |
+ source_state_ = kLive; |
+} |
+ |
} // namespace webrtc |