Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
iframe_reader.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_audio/iframe_reader.h
10//! @brief Frame reader interface.
11
12#ifndef ROC_AUDIO_IFRAME_READER_H_
13#define ROC_AUDIO_IFRAME_READER_H_
14
15#include "roc_audio/frame.h"
16#include "roc_core/list_node.h"
17
18namespace roc {
19namespace audio {
20
21//! Frame reader interface.
22class IFrameReader : public core::ListNode<> {
23public:
24 virtual ~IFrameReader();
25
26 //! Read audio frame.
27 //! @remarks
28 //! Frame buffer and its size should be set by caller. The reader
29 //! should fill the entire buffer and should not resize it.
30 //! @returns
31 //! false if there is nothing to read anymore.
32 virtual bool read(Frame& frame) = 0;
33};
34
35} // namespace audio
36} // namespace roc
37
38#endif // ROC_AUDIO_IFRAME_READER_H_
Audio frame.
Definition frame.h:25
Frame reader interface.
virtual bool read(Frame &frame)=0
Read audio frame.
Base class for List element.
Definition list_node.h:48
Audio frame.
Linked list node.
Root namespace.