Open Ephys GUI
 All Classes Functions Variables Pages
Merger.h
1 /*
2  ------------------------------------------------------------------
3 
4  This file is part of the Open Ephys GUI
5  Copyright (C) 2012 Open Ephys
6 
7  ------------------------------------------------------------------
8 
9  This program is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #ifndef __MERGER_H_ED548E77__
25 #define __MERGER_H_ED548E77__
26 
27 #include "../../../JuceLibraryCode/JuceHeader.h"
28 #include "../GenericProcessor.h"
29 
30 #include <stdio.h>
31 
32 
33 /**
34 
35  Allows the user to merge two signal chains.
36 
37  @see GenericProcessor, ProcessorGraph
38 
39 */
40 
41 class Merger : public GenericProcessor
42 {
43 public:
44 
45  Merger();
46  ~Merger();
47 
48  AudioProcessorEditor* createEditor();
49 
50  void process(AudioSampleBuffer &buffer, MidiBuffer &midiMessages, int& nSamples) {}
51 
52  bool isMerger() {return true;}
53 
54  void switchIO(int);
55  void switchIO();
56  void setMergerSourceNode(GenericProcessor* sn);
57 
58  void updateSettings();
59  void addSettingsFromSourceNode(GenericProcessor* sn);
60 
61  bool stillHasSource();
62 
63 private:
64 
65  GenericProcessor* sourceNodeA;
66  GenericProcessor* sourceNodeB;
67 
68  int activePath;
69 
70  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Merger);
71 
72 };
73 
74 
75 
76 
77 #endif // __MERGER_H_ED548E77__