Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
isource.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 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/isource.h
10
//! @brief Source interface.
11
12
#ifndef ROC_SNDIO_ISOURCE_H_
13
#define ROC_SNDIO_ISOURCE_H_
14
15
#include "
roc_audio/iframe_reader.h
"
16
#include "
roc_core/time.h
"
17
#include "
roc_sndio/idevice.h
"
18
19
namespace
roc
{
20
namespace
sndio {
21
22
//! Source interface.
23
class
ISource
:
virtual
public
IDevice
,
public
audio::IFrameReader
{
24
public
:
25
virtual
~
ISource
();
26
27
//! Adjust source clock to match consumer clock.
28
//! @remarks
29
//! Invoked regularly after reading every or several frames.
30
//! @p timestamp defines the time in Unix domain when the last sample of the last
31
//! frame read from source is going to be actually processed by consumer.
32
virtual
void
reclock
(
core::nanoseconds_t
timestamp
) = 0;
33
};
34
35
}
// namespace sndio
36
}
// namespace roc
37
38
#endif
// ROC_SNDIO_ISOURCE_H_
roc::audio::IFrameReader
Frame reader interface.
Definition:
iframe_reader.h:22
roc::sndio::IDevice
Base interface for sinks and sources.
Definition:
idevice.h:28
roc::sndio::ISource
Source interface.
Definition:
isource.h:23
roc::sndio::ISource::reclock
virtual void reclock(core::nanoseconds_t timestamp)=0
Adjust source clock to match consumer clock.
idevice.h
Device interface.
iframe_reader.h
Frame reader interface.
roc::core::timestamp
nanoseconds_t timestamp(clock_t clock)
Get current timestamp in nanoseconds.
roc::core::nanoseconds_t
int64_t nanoseconds_t
Nanoseconds.
Definition:
time.h:58
roc
Root namespace.
time.h
Time definitions.
roc_sndio
isource.h
Generated by
1.9.1