Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
channel_mapper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Roc Streaming authors
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8
9//! @file roc_audio/channel_mapper.h
10//! @brief Mixer.
11
12#ifndef ROC_AUDIO_CHANNEL_MAPPER_H_
13#define ROC_AUDIO_CHANNEL_MAPPER_H_
14
15#include "roc_audio/frame.h"
18#include "roc_packet/units.h"
19
20namespace roc {
21namespace audio {
22
23//! Channel mapper.
24//! Converts between frames with specified channel masks.
26public:
27 //! Initialize.
29
30 //! Map frame.
31 void map(const Frame& in_frame, Frame& out_frame);
32
33private:
34 const packet::channel_mask_t in_chan_mask_;
35 const packet::channel_mask_t out_chan_mask_;
36
37 const size_t in_chan_count_;
38 const size_t out_chan_count_;
39
40 const packet::channel_mask_t inout_chan_mask_;
41};
42
43} // namespace audio
44} // namespace roc
45
46#endif // ROC_AUDIO_CHANNEL_MAPPER_H_
Buffer factory.
Channel mapper. Converts between frames with specified channel masks.
void map(const Frame &in_frame, Frame &out_frame)
Map frame.
ChannelMapper(packet::channel_mask_t in_chans, packet::channel_mask_t out_chans)
Initialize.
Audio frame.
Definition frame.h:22
Base class for non-copyable objects.
Definition noncopyable.h:23
Audio frame.
uint32_t channel_mask_t
Bitmask of channels present in audio packet.
Definition units.h:94
Root namespace.
Non-copyable object.
Various units used in packets.