LiveKit C++ SDK
Real-time audio/video SDK for C++
Loading...
Searching...
No Matches
local_audio_track.h
1/*
2 * Copyright 2025 LiveKit
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an “AS IS” BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include "track.h"
20#include <memory>
21#include <string>
22
23namespace livekit {
24
25namespace proto {
26class OwnedTrack;
27}
28
29class AudioSource;
30
51class LocalAudioTrack : public Track {
52public:
60 static std::shared_ptr<LocalAudioTrack>
61 createLocalAudioTrack(const std::string &name,
62 const std::shared_ptr<AudioSource> &source);
63
68 void mute();
69
71 void unmute();
72
75 std::string to_string() const;
76
77private:
78 explicit LocalAudioTrack(FfiHandle handle, const proto::OwnedTrack &track);
79};
80
81} // namespace livekit
RAII wrapper for an FFI handle (uintptr_t) coming from Rust.
Definition ffi_handle.h:29
Definition local_audio_track.h:51
static std::shared_ptr< LocalAudioTrack > createLocalAudioTrack(const std::string &name, const std::shared_ptr< AudioSource > &source)
std::string to_string() const
void unmute()
Unmutes the audio track and resumes sending audio to the room.
Definition track.h:71