blob: 22ab1c39c33e96d4631e026295d31efe23e2599e [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
kjellanderb24317b2016-02-10 07:54:43 -08002 * Copyright 2013 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00003 *
kjellanderb24317b2016-02-10 07:54:43 -08004 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00009 */
10
Steve Anton10542f22019-01-11 09:11:00 -080011#include "pc/local_audio_source.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000012
Steve Anton10542f22019-01-11 09:11:00 -080013#include "rtc_base/ref_counted_object.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000014
henrike@webrtc.org28e20752013-07-10 00:45:36 +000015using webrtc::MediaSourceInterface;
16
17namespace webrtc {
18
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000019rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create(
htaa2a49d92016-03-04 02:51:39 -080020 const cricket::AudioOptions* audio_options) {
21 rtc::scoped_refptr<LocalAudioSource> source(
22 new rtc::RefCountedObject<LocalAudioSource>());
deadbeef757146b2017-02-10 21:26:48 -080023 source->Initialize(audio_options);
htaa2a49d92016-03-04 02:51:39 -080024 return source;
25}
26
Yves Gerey665174f2018-06-19 15:03:05 +020027void LocalAudioSource::Initialize(const cricket::AudioOptions* audio_options) {
htaa2a49d92016-03-04 02:51:39 -080028 if (!audio_options)
29 return;
30
31 options_ = *audio_options;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000032}
33
34} // namespace webrtc