blob: 2e89a7a36eae0f77db2eee43b864d1a5d366ce4e [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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#include "pc/localaudiosource.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000012
Yves Gerey3e707812018-11-28 16:47:49 +010013#include "rtc_base/refcountedobject.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