blob: 22ab1c39c33e96d4631e026295d31efe23e2599e [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:361/*
kjellanderb24317b2016-02-10 15:54:432 * Copyright 2013 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:363 *
kjellanderb24317b2016-02-10 15:54:434 * 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:369 */
10
Steve Anton10542f22019-01-11 17:11:0011#include "pc/local_audio_source.h"
henrike@webrtc.org28e20752013-07-10 00:45:3612
Steve Anton10542f22019-01-11 17:11:0013#include "rtc_base/ref_counted_object.h"
henrike@webrtc.org28e20752013-07-10 00:45:3614
henrike@webrtc.org28e20752013-07-10 00:45:3615using webrtc::MediaSourceInterface;
16
17namespace webrtc {
18
buildbot@webrtc.orgd4e598d2014-07-29 17:36:5219rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create(
htaa2a49d92016-03-04 10:51:3920 const cricket::AudioOptions* audio_options) {
21 rtc::scoped_refptr<LocalAudioSource> source(
22 new rtc::RefCountedObject<LocalAudioSource>());
deadbeef757146b2017-02-11 05:26:4823 source->Initialize(audio_options);
htaa2a49d92016-03-04 10:51:3924 return source;
25}
26
Yves Gerey665174f2018-06-19 13:03:0527void LocalAudioSource::Initialize(const cricket::AudioOptions* audio_options) {
htaa2a49d92016-03-04 10:51:3928 if (!audio_options)
29 return;
30
31 options_ = *audio_options;
henrike@webrtc.org28e20752013-07-10 00:45:3632}
33
34} // namespace webrtc