henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 1 | /* |
kjellander | b24317b | 2016-02-10 15:54:43 | [diff] [blame] | 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 3 | * |
kjellander | b24317b | 2016-02-10 15:54:43 | [diff] [blame] | 4 | * 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.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 9 | */ |
| 10 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 11 | #include "pc/local_audio_source.h" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 12 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 13 | using webrtc::MediaSourceInterface; |
| 14 | |
| 15 | namespace webrtc { |
| 16 | |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 | [diff] [blame] | 17 | rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create( |
hta | a2a49d9 | 2016-03-04 10:51:39 | [diff] [blame] | 18 | const cricket::AudioOptions* audio_options) { |
Tommi | 87f7090 | 2021-04-27 12:43:08 | [diff] [blame] | 19 | auto source = rtc::make_ref_counted<LocalAudioSource>(); |
deadbeef | 757146b | 2017-02-11 05:26:48 | [diff] [blame] | 20 | source->Initialize(audio_options); |
hta | a2a49d9 | 2016-03-04 10:51:39 | [diff] [blame] | 21 | return source; |
| 22 | } |
| 23 | |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 24 | void LocalAudioSource::Initialize(const cricket::AudioOptions* audio_options) { |
hta | a2a49d9 | 2016-03-04 10:51:39 | [diff] [blame] | 25 | if (!audio_options) |
| 26 | return; |
| 27 | |
| 28 | options_ = *audio_options; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | } // namespace webrtc |