NAP
inputnode.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 // Std includes
8 #include <atomic>
9 
10 // Audio includes
11 #include <audio/core/audionode.h>
12 
13 namespace nap
14 {
15  namespace audio
16  {
17 
18 
23  class NAPAPI InputNode final : public Node
24  {
25  RTTI_ENABLE(Node)
26 
27  friend class NodeManager;
28 
29  public:
33  InputNode(NodeManager& manager) : Node(manager) { }
34 
38  OutputPin audioOutput = {this};
39 
44  void setInputChannel(int inputChannel) { mInputChannel = inputChannel; }
45 
49  int getInputChannel() const { return mInputChannel; }
50 
54  int getAvailableInputChannelCount();
55 
56  private:
57  void process() override;
58 
59  std::atomic<int> mInputChannel = {0}; // Input channel of the audio interface to receive input data from.
60  };
61 
62 
63  }
64 }
65 
66 
67 
68 
69 
nap::audio::InputNode::getInputChannel
int getInputChannel() const
Definition: inputnode.h:49
nap::audio::NodeManager
Definition: audionodemanager.h:33
nap::audio::OutputPin
Definition: audiopin.h:204
nap::audio::Node
Definition: audionode.h:33
nap
Definition: templateapp.h:17
nap::audio::InputNode
Definition: inputnode.h:23
nap::audio::InputNode::setInputChannel
void setInputChannel(int inputChannel)
Definition: inputnode.h:44