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
"
20
#include "
roc_sndio/terminal_type.h
"
21
22
namespace
roc
{
23
namespace
sndio {
24
25
//! Maximum number of backends.
26
static
const
size_t
MaxBackends = 8;
27
28
//! Backend interface.
29
class
IBackend
{
30
public
:
31
virtual
~IBackend
();
32
33
//! Append supported drivers to the list.
34
virtual
void
discover_drivers
(
core::Array<DriverInfo, MaxDrivers>
& driver_list) = 0;
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_
array.h
Dynamic array.
roc::core::Array
Dynamic array.
Definition
array.h:38
roc::core::IAllocator
Memory allocator interface.
Definition
iallocator.h:23
roc::sndio::IBackend
Backend interface.
Definition
ibackend.h:29
roc::sndio::IBackend::open_terminal
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.
roc::sndio::IBackend::discover_drivers
virtual void discover_drivers(core::Array< DriverInfo, MaxDrivers > &driver_list)=0
Append supported drivers to the list.
roc::sndio::ITerminal
Base interface for sinks and sources.
Definition
iterminal.h:23
driver.h
Driver types.
iallocator.h
Memory allocator interface.
iterminal.h
Terminal interface.
roc::sndio::TerminalType
TerminalType
Terminal type.
Definition
terminal_type.h:19
roc::sndio::DriverType
DriverType
Driver type.
Definition
driver.h:27
roc
Root namespace.
config.h
Sink and source config.
roc::sndio::Config
Sink and source config.
Definition
config.h:23
terminal_type.h
Terminal type.
roc_sndio
ibackend.h
Generated by
1.9.7