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

Revision 462, 2.7 kB (checked in by ppalmers, 15 years ago)

- Rework the OSC space to something more usable

Line 
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_GENERICMIXER__
25 #define __FFAD0_GENERICMIXER__
26
27 #include "src/debugmodule/debugmodule.h"
28
29 #include "libosc/OscNode.h"
30
31 #include "libieee1394/ieee1394service.h"
32 #include "libieee1394/configrom.h"
33
34 namespace BeBoB {
35 class AvDevice;
36
37 class GenericMixer
38     : public OSC::OscNode {
39
40 public:
41
42     GenericMixer(
43         Ieee1394Service& ieee1394service,
44         AvDevice &d);
45     virtual ~GenericMixer();
46
47     virtual OSC::OscResponse processOscMessage(OSC::OscMessage *m);
48
49 protected:
50     OSC::OscResponse processOscMessageRoot(OSC::OscMessage *m);
51     OSC::OscResponse processOscMessageSelector(std::string, OSC::OscMessage *m);
52     OSC::OscResponse processOscMessageFeature(std::string, OSC::OscMessage *m);
53     OSC::OscResponse processOscMessageProcessing(std::string, OSC::OscMessage *m);
54
55 protected:
56     OSC::OscResponse rootListChildren();
57     OSC::OscResponse selectorListChildren(int);
58     OSC::OscResponse selectorListParams(int id);
59     OSC::OscResponse selectorGetParam(int id, std::string p, OSC::OscMessage *src);
60     OSC::OscResponse selectorSetParam(int id, std::string p, OSC::OscMessage *src);
61
62     OSC::OscResponse featureListChildren(int);
63     OSC::OscResponse featureListParams(int id);
64     OSC::OscResponse featureGetParam(int id, std::string p, OSC::OscMessage *src);
65     OSC::OscResponse featureSetParam(int id, std::string p, OSC::OscMessage *src);
66    
67     OSC::OscResponse processingListChildren(int);
68     OSC::OscResponse codecListChildren(int);
69    
70     bool getSelectorValue(int id, int &value);
71     bool setSelectorValue(int id, int value);
72    
73     bool getFeatureVolumeValue(int fb_id, int channel, int &volume);
74     bool setFeatureVolumeValue(int id, int channel, int volume);
75    
76 protected:
77     Ieee1394Service      &m_p1394Service;
78     AvDevice             &m_device;
79
80 protected:
81     DECLARE_DEBUG_MODULE;
82
83 };
84
85 } // end of namespace BeBoB
86
87 #endif /* __FFAD0_GENERICMIXER__ */
88
89
Note: See TracBrowser for help on using the browser.