Open Ephys GUI
 All Classes Functions Variables Pages
AudioNode.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 __AUDIONODE_H_AF61F3C5__
25 #define __AUDIONODE_H_AF61F3C5__
26 
27 
28 #include "../../JuceLibraryCode/JuceHeader.h"
29 #include <stdio.h>
30 
31 #include "GenericProcessor.h"
32 #include "Editors/AudioEditor.h"
33 
34 /**
35 
36  --NOT YET IMPLEMENTED--
37 
38  Selects which channels to send to the audio monitor. Controls output volume.
39 
40  @see GenericProcessor, AudioEditor
41 
42 */
43 
44 class AudioEditor;
45 
47 {
48 public:
49 
50  // real member functions:
51  AudioNode();
52  ~AudioNode();
53 
54  void process(AudioSampleBuffer &buffer, MidiBuffer &midiMessages, int& nSamples);
55  void setParameter (int parameterIndex, float newValue);
56 
57  AudioProcessorEditor* createEditor();
58 
59  void setChannelStatus(int, bool);
60 
61  bool isAudioOrRecordNode() {return true;}
62 
63  void enableCurrentChannel(bool);
64 
65  // AudioEditor* getEditor() {return audioEditor;}
66 
67  ScopedPointer<AudioEditor> audioEditor;
68 
69 private:
70 
71  Array<int> leftChan;
72  Array<int> rightChan;
73  float volume;
74 
75  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioNode);
76 
77 };
78 
79 
80 
81 
82 
83 #endif // __AUDIONODE_H_AF61F3C5__