Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Roc 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_sndio/config.h
10//! @brief Sink and source config.
11
12#ifndef ROC_SNDIO_CONFIG_H_
13#define ROC_SNDIO_CONFIG_H_
14
15#include "roc_core/stddefs.h"
16#include "roc_packet/units.h"
17
18namespace roc {
19namespace sndio {
20
21//! Sink and source config.
22struct Config {
23 //! Channel mask.
25
26 //! Number of samples per channel per seconds.
28
29 //! Number of samples per frame, for all channels.
30 size_t frame_size;
31
32 //! Requested input or output latency.
34
35 //! Initialize.
37 : channels(0)
38 , sample_rate(0)
39 , frame_size(0)
40 , latency(0) {
41 }
42};
43
44} // namespace sndio
45} // namespace roc
46
47#endif // ROC_SNDIO_CONFIG_H_
int64_t nanoseconds_t
Nanoseconds.
Definition: time.h:21
uint32_t channel_mask_t
Bitmask of channels present in audio packet.
Definition: units.h:77
Root namespace.
Various units used in packets.
Commonly used types and functions.
Sink and source config.
Definition: config.h:22
packet::channel_mask_t channels
Channel mask.
Definition: config.h:24
Config()
Initialize.
Definition: config.h:36
size_t frame_size
Number of samples per frame, for all channels.
Definition: config.h:30
size_t sample_rate
Number of samples per channel per seconds.
Definition: config.h:27
core::nanoseconds_t latency
Requested input or output latency.
Definition: config.h:33