blob: b2fdd4dcae927a772083bfa10483cc82f7534b8b [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
13#include <vector>
14
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020015#include "media/base/mediaengine.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000016
henrike@webrtc.org28e20752013-07-10 00:45:36 +000017using webrtc::MediaSourceInterface;
18
19namespace webrtc {
20
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000021rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create(
htaa2a49d92016-03-04 02:51:39 -080022 const cricket::AudioOptions* audio_options) {
23 rtc::scoped_refptr<LocalAudioSource> source(
24 new rtc::RefCountedObject<LocalAudioSource>());
deadbeef757146b2017-02-10 21:26:48 -080025 source->Initialize(audio_options);
htaa2a49d92016-03-04 02:51:39 -080026 return source;
27}
28
henrike@webrtc.org28e20752013-07-10 00:45:36 +000029void LocalAudioSource::Initialize(
htaa2a49d92016-03-04 02:51:39 -080030 const cricket::AudioOptions* audio_options) {
31 if (!audio_options)
32 return;
33
34 options_ = *audio_options;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000035}
36
37} // namespace webrtc