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 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_sndio/config.h
10//! @brief Sink and source config.
11
12#ifndef ROC_SNDIO_CONFIG_H_
13#define ROC_SNDIO_CONFIG_H_
14
16#include "roc_core/stddefs.h"
17#include "roc_core/time.h"
18#include "roc_packet/units.h"
19
20namespace roc {
21namespace sndio {
22
23//! Default frame length.
24//! 10ms is rather high, but works well even on cheap sound cards and CPUs.
25//! Usually you can use much lower values.
27
28//! Sink and source config.
29struct Config {
30 //! Sample spec
32
33 //! Duration of the internal frames, in nanoseconds.
35
36 //! Requested input or output latency.
38
39 //! Initialize.
44};
45
46} // namespace sndio
47} // namespace roc
48
49#endif // ROC_SNDIO_CONFIG_H_
Sample specification. Describes sample rate and channels.
Definition sample_spec.h:30
const nanoseconds_t Millisecond
One millisecond represented in nanoseconds.
Definition time.h:67
int64_t nanoseconds_t
Nanoseconds.
Definition time.h:58
const core::nanoseconds_t DefaultFrameLength
Default frame length. 10ms is rather high, but works well even on cheap sound cards and CPUs....
Definition config.h:26
Root namespace.
Sample specifications.
Commonly used types and functions.
Sink and source config.
Definition config.h:29
Config()
Initialize.
Definition config.h:40
audio::SampleSpec sample_spec
Sample spec.
Definition config.h:31
core::nanoseconds_t latency
Requested input or output latency.
Definition config.h:37
core::nanoseconds_t frame_length
Duration of the internal frames, in nanoseconds.
Definition config.h:34
Time definitions.
Various units used in packets.