NAP
stereopannernode.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 
21  class NAPAPI StereoPannerNode : public Node
22  {
23  public:
24  StereoPannerNode(NodeManager& manager);
25 
29  void setPanning(ControllerValue value);
30 
34  InputPin leftInput = {this};
35 
39  InputPin rightInput = {this};
40 
44  OutputPin leftOutput = {this};
45 
49  OutputPin rightOutput = {this};
50 
51  private:
52  void process() override;
53 
54  std::atomic<ControllerValue> mNewPanning = {0.5};
55 
56  ControllerValue mPanning = 0.5f;
57  ControllerValue mLeftGain = 0; // Gain factor of the left channel
58  ControllerValue mRightGain = 0; // Gain factor of the right channel
59  };
60 
61  }
62 }
nap::audio::StereoPannerNode
Definition: stereopannernode.h:21
nap::audio::NodeManager
Definition: audionodemanager.h:33
nap::audio::ControllerValue
float ControllerValue
Definition: audiotypes.h:113
nap::audio::OutputPin
Definition: audiopin.h:204
nap::audio::Node
Definition: audionode.h:33
nap::audio::InputPin
Definition: audiopin.h:87
nap
Definition: templateapp.h:17