Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
iterminal.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_sndio/iterminal.h
10//! @brief Terminal interface.
11
12#ifndef ROC_SNDIO_ITERMINAL_H_
13#define ROC_SNDIO_ITERMINAL_H_
14
16#include "roc_core/stddefs.h"
17#include "roc_core/time.h"
18
19namespace roc {
20namespace sndio {
21
22//! Base interface for sinks and sources.
23class ITerminal {
24public:
25 virtual ~ITerminal();
26
27 //! Get sample specification of the terminal.
28 virtual audio::SampleSpec sample_spec() const = 0;
29
30 //! Get latency of the terminal.
31 virtual core::nanoseconds_t latency() const = 0;
32
33 //! Check if the terminal has own clock.
34 virtual bool has_clock() const = 0;
35};
36
37} // namespace sndio
38} // namespace roc
39
40#endif // ROC_SNDIO_ITERMINAL_H_
Sample stream specification. Defines sample rate and channel layout.
Definition sample_spec.h:24
Base interface for sinks and sources.
Definition iterminal.h:23
virtual core::nanoseconds_t latency() const =0
Get latency of the terminal.
virtual audio::SampleSpec sample_spec() const =0
Get sample specification of the terminal.
virtual bool has_clock() const =0
Check if the terminal has own clock.
int64_t nanoseconds_t
Nanoseconds.
Definition time.h:58
Root namespace.
Sample specifications.
Commonly used types and functions.
Time definitions.