Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
ibackend.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/ibackend.h
10//! @brief Backend interface.
11
12#ifndef ROC_SNDIO_IBACKEND_H_
13#define ROC_SNDIO_IBACKEND_H_
14
15#include "roc_core/array.h"
16#include "roc_core/iallocator.h"
17#include "roc_sndio/config.h"
18#include "roc_sndio/driver.h"
19#include "roc_sndio/iterminal.h"
21
22namespace roc {
23namespace sndio {
24
25//! Maximum number of backends.
26static const size_t MaxBackends = 8;
27
28//! Backend interface.
29class IBackend {
30public:
31 virtual ~IBackend();
32
33 //! Append supported drivers to the list.
35
36 //! Create and open a sink or source.
37 virtual ITerminal* open_terminal(TerminalType terminal_type,
38 DriverType driver_type,
39 const char* driver,
40 const char* path,
41 const Config& config,
42 core::IAllocator& allocator) = 0;
43};
44
45} // namespace sndio
46} // namespace roc
47
48#endif // ROC_SNDIO_IBACKEND_H_
Dynamic array.
Dynamic array.
Definition array.h:38
Memory allocator interface.
Definition iallocator.h:23
Backend interface.
Definition ibackend.h:29
virtual ITerminal * open_terminal(TerminalType terminal_type, DriverType driver_type, const char *driver, const char *path, const Config &config, core::IAllocator &allocator)=0
Create and open a sink or source.
virtual void discover_drivers(core::Array< DriverInfo, MaxDrivers > &driver_list)=0
Append supported drivers to the list.
Base interface for sinks and sources.
Definition iterminal.h:23
Driver types.
Memory allocator interface.
Terminal interface.
TerminalType
Terminal type.
DriverType
Driver type.
Definition driver.h:27
Root namespace.
Sink and source config.
Sink and source config.
Definition config.h:23
Terminal type.