1 |
/* |
---|
2 |
* Copyright (C) 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 library is free software; you can redistribute it and/or |
---|
10 |
* modify it under the terms of the GNU Lesser General Public |
---|
11 |
* License version 2.1, as published by the Free Software Foundation; |
---|
12 |
* |
---|
13 |
* This library is distributed in the hope that it will be useful, |
---|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
16 |
* Lesser General Public License for more details. |
---|
17 |
* |
---|
18 |
* You should have received a copy of the GNU Lesser General Public |
---|
19 |
* License along with this library; if not, write to the Free Software |
---|
20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
---|
21 |
* MA 02110-1301 USA |
---|
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 |
|
---|
39 |
class Mixer |
---|
40 |
: public Control::Container |
---|
41 |
{ |
---|
42 |
public: |
---|
43 |
Mixer(AvDevice &d); |
---|
44 |
virtual ~Mixer(); |
---|
45 |
|
---|
46 |
virtual std::string getName() |
---|
47 |
{ return "Mixer"; }; |
---|
48 |
virtual bool setName( std::string n ) |
---|
49 |
{ return false; }; |
---|
50 |
|
---|
51 |
bool addElementForFunctionBlock(FunctionBlock& b); |
---|
52 |
bool addElementForAllFunctionBlocks(); |
---|
53 |
|
---|
54 |
// manipulation of the contained elements |
---|
55 |
bool addElement(Control::Element *) |
---|
56 |
{debugWarning("not allowed"); return false;}; |
---|
57 |
bool deleteElement(Control::Element *); |
---|
58 |
bool clearElements(); |
---|
59 |
|
---|
60 |
AvDevice& getParent() |
---|
61 |
{return m_device;}; |
---|
62 |
|
---|
63 |
protected: |
---|
64 |
AvDevice& m_device; |
---|
65 |
protected: |
---|
66 |
DECLARE_DEBUG_MODULE; |
---|
67 |
}; |
---|
68 |
|
---|
69 |
class MixerFBFeatureVolume |
---|
70 |
: public Control::Continuous |
---|
71 |
{ |
---|
72 |
public: |
---|
73 |
MixerFBFeatureVolume(Mixer& parent, FunctionBlockFeature&, int channel); |
---|
74 |
|
---|
75 |
virtual bool setValue(double v); |
---|
76 |
virtual double getValue(); |
---|
77 |
|
---|
78 |
private: |
---|
79 |
Mixer& m_Parent; |
---|
80 |
FunctionBlockFeature& m_Slave; |
---|
81 |
unsigned int m_channel; |
---|
82 |
}; |
---|
83 |
|
---|
84 |
} // end of namespace BeBoB |
---|
85 |
|
---|
86 |
#endif /* __FFAD0_BEBOB_MIXER__ */ |
---|
87 |
|
---|
88 |
|
---|