blob: b998886007521c092bd8319cd21fad64f943217f [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
Harald Alvestrandf0d5caf2025-04-07 09:08:5113#include "api/audio_options.h"
14#include "api/make_ref_counted.h"
15#include "api/media_stream_interface.h"
16#include "api/scoped_refptr.h"
17
henrike@webrtc.org28e20752013-07-10 00:45:3618using webrtc::MediaSourceInterface;
19
20namespace webrtc {
21
buildbot@webrtc.orgd4e598d2014-07-29 17:36:5222rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create(
Evan Shrubsole945e5172025-04-08 14:11:4523 const AudioOptions* audio_options) {
Tommi87f70902021-04-27 12:43:0824 auto source = rtc::make_ref_counted<LocalAudioSource>();
deadbeef757146b2017-02-11 05:26:4825 source->Initialize(audio_options);
htaa2a49d92016-03-04 10:51:3926 return source;
27}
28
Evan Shrubsole945e5172025-04-08 14:11:4529void LocalAudioSource::Initialize(const AudioOptions* audio_options) {
htaa2a49d92016-03-04 10:51:3930 if (!audio_options)
31 return;
32
33 options_ = *audio_options;
henrike@webrtc.org28e20752013-07-10 00:45:3634}
35
36} // namespace webrtc