Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
poison_writer.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 Roc 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/poison_writer.h
10 //! @brief Poison writer.
11 
12 #ifndef ROC_AUDIO_POISON_WRITER_H_
13 #define ROC_AUDIO_POISON_WRITER_H_
14 
15 #include "roc_audio/frame.h"
16 #include "roc_audio/iwriter.h"
17 #include "roc_core/noncopyable.h"
18 
19 namespace roc {
20 namespace audio {
21 
22 //! Poisons audio frames after writing them.
23 class PoisonWriter : public IWriter, public core::NonCopyable<> {
24 public:
25  //! Initialize.
26  explicit PoisonWriter(IWriter& writer);
27 
28  //! Write audio frame.
29  virtual void write(Frame&);
30 
31 private:
32  IWriter& writer_;
33 };
34 
35 } // namespace audio
36 } // namespace roc
37 
38 #endif // ROC_AUDIO_POISON_WRITER_H_
Audio writer interface.
Definition: iwriter.h:21
virtual void write(Frame &)
Write audio frame.
Poisons audio frames after writing them.
Definition: poison_writer.h:23
Root namespace.
PoisonWriter(IWriter &writer)
Initialize.
Audio frame.
Definition: frame.h:22
Audio writer interface.
Audio frame.
Base class for non-copyable objects.
Definition: noncopyable.h:23
Non-copyable object.