Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
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
16#include "roc_core/time.h"
17#include "roc_sndio/idevice.h"
18
19namespace roc {
20namespace sndio {
21
22//! Source interface.
23class ISource : virtual public IDevice, public audio::IFrameReader {
24public:
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_
Frame reader interface.
Base interface for sinks and sources.
Definition idevice.h:28
Source interface.
Definition isource.h:23
virtual void reclock(core::nanoseconds_t timestamp)=0
Adjust source clock to match consumer clock.
Device interface.
Frame reader interface.
int64_t nanoseconds_t
Nanoseconds.
Definition time.h:58
Root namespace.
Time definitions.