root/trunk/libffado/src/bebob/bebob_mixer.h

Revision 742, 2.4 kB (checked in by ppalmers, 13 years ago)

- Remove some obsolete support files and dirs

- Clean up the license statements in the source files. Everything is

GPL version 3 now.

- Add license and copyright notices to scons scripts

- Clean up some other text files

Line 
1 /*
2  * Copyright (C) 2005-2007 by Pieter Palmers
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB
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 __FFAD0_BEBOB_MIXER__
25 #define __FFAD0_BEBOB_MIXER__
26
27 #include "src/debugmodule/debugmodule.h"
28
29 #include "libcontrol/BasicElements.h"
30
31 #include <vector>
32
33 namespace BeBoB {
34
35 class AvDevice;
36 class FunctionBlock;
37 class FunctionBlockFeature;
38 class FunctionBlockSelector;
39
40 class Mixer
41     : public Control::Container
42 {
43 public:
44     Mixer(AvDevice &d);
45     virtual ~Mixer();
46
47     virtual std::string getName()
48         { return "Mixer"; };
49     virtual bool setName( std::string n )
50         { return false; };
51
52     bool addElementForFunctionBlock(FunctionBlock& b);
53     bool addElementForAllFunctionBlocks();
54
55     // manipulation of the contained elements
56     bool addElement(Control::Element *)
57         {debugWarning("not allowed"); return false;};
58     bool deleteElement(Control::Element *);
59     bool clearElements();
60
61     AvDevice& getParent()
62         {return m_device;};
63
64 protected:
65     AvDevice&            m_device;
66 protected:
67     DECLARE_DEBUG_MODULE;
68 };
69
70 class MixerFBFeature
71     : public Control::Continuous
72 {
73 public:
74     MixerFBFeature(Mixer& parent, FunctionBlockFeature&);
75    
76     virtual bool setValue(double v);
77     virtual double getValue();
78    
79 private:
80     Mixer&                  m_Parent;
81     FunctionBlockFeature&   m_Slave;
82 };
83
84 class MixerFBSelector
85     : public Control::Discrete
86 {
87 public:
88     MixerFBSelector(Mixer& parent, FunctionBlockSelector&);
89    
90     virtual bool setValue(int v);
91     virtual int getValue();
92    
93 private:
94     Mixer&                  m_Parent;
95     FunctionBlockSelector&  m_Slave;
96 };
97
98 } // end of namespace BeBoB
99
100 #endif /* __FFAD0_BEBOB_MIXER__ */
101
102
Note: See TracBrowser for help on using the browser.