root/trunk/libffado/src/fireworks/efc/efc_cmds_monitor.h

Revision 824, 3.7 kB (checked in by wagi, 15 years ago)

- moved cmd_serialize.h Util:: namespace to Util::Cmd:: in order to avoid ambiguities with serialize.h
- bebob: enhanced mixer stuff added (not finished)

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 FIREWORKS_EFC_CMD_MONITOR_H
25 #define FIREWORKS_EFC_CMD_MONITOR_H
26
27 #include "efc_cmd.h"
28
29 namespace FireWorks {
30
31 enum eMonitorCommand {
32     eMoC_Gain,
33     eMoC_Solo,
34     eMoC_Mute,
35     eMoC_Pan,
36 };
37
38 class EfcGenericMonitorCmd : public EfcCmd
39 {
40 public:
41     enum eCmdType {
42         eCT_Get,
43         eCT_Set,
44     };
45 public:
46     EfcGenericMonitorCmd(enum eCmdType, enum eMonitorCommand);
47     virtual ~EfcGenericMonitorCmd() {};
48
49     virtual bool serialize( Util::Cmd::IOSSerialize& se );
50     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
51
52     virtual void showEfcCmd();
53
54     int32_t     m_input;
55     int32_t     m_output;
56     uint32_t    m_value;
57
58 private:
59     enum eCmdType         m_type;
60     enum eMonitorCommand  m_command;
61 };
62
63 // --- Specific implementations
64 class EfcGetMonitorGainCmd : public EfcGenericMonitorCmd
65 {
66 public:
67     EfcGetMonitorGainCmd()
68     : EfcGenericMonitorCmd(eCT_Get, eMoC_Gain) {};
69     virtual ~EfcGetMonitorGainCmd() {};
70
71     virtual const char* getCmdName() const
72     { return "EfcGetMonitorGainCmd"; }
73 };
74 class EfcSetMonitorGainCmd : public EfcGenericMonitorCmd
75 {
76 public:
77     EfcSetMonitorGainCmd()
78     : EfcGenericMonitorCmd(eCT_Set, eMoC_Gain) {};
79     virtual ~EfcSetMonitorGainCmd() {};
80
81     virtual const char* getCmdName() const
82     { return "EfcSetMonitorGainCmd"; }
83 };
84
85 class EfcGetMonitorSoloCmd : public EfcGenericMonitorCmd
86 {
87 public:
88     EfcGetMonitorSoloCmd()
89     : EfcGenericMonitorCmd(eCT_Get, eMoC_Solo) {};
90     virtual ~EfcGetMonitorSoloCmd() {};
91
92     virtual const char* getCmdName() const
93     { return "EfcGetMonitorSoloCmd"; }
94 };
95 class EfcSetMonitorSoloCmd : public EfcGenericMonitorCmd
96 {
97 public:
98     EfcSetMonitorSoloCmd()
99     : EfcGenericMonitorCmd(eCT_Set, eMoC_Solo) {};
100     virtual ~EfcSetMonitorSoloCmd() {};
101
102     virtual const char* getCmdName() const
103     { return "EfcSetMonitorSoloCmd"; }
104 };
105
106 class EfcGetMonitorMuteCmd : public EfcGenericMonitorCmd
107 {
108 public:
109     EfcGetMonitorMuteCmd()
110     : EfcGenericMonitorCmd(eCT_Get, eMoC_Mute) {};
111     virtual ~EfcGetMonitorMuteCmd() {};
112
113     virtual const char* getCmdName() const
114     { return "EfcGetMonitorMuteCmd"; }
115 };
116 class EfcSetMonitorMuteCmd : public EfcGenericMonitorCmd
117 {
118 public:
119     EfcSetMonitorMuteCmd()
120     : EfcGenericMonitorCmd(eCT_Set, eMoC_Mute) {};
121     virtual ~EfcSetMonitorMuteCmd() {};
122
123     virtual const char* getCmdName() const
124     { return "EfcSetMonitorMuteCmd"; }
125 };
126
127 class EfcGetMonitorPanCmd : public EfcGenericMonitorCmd
128 {
129 public:
130     EfcGetMonitorPanCmd()
131     : EfcGenericMonitorCmd(eCT_Get, eMoC_Pan) {};
132     virtual ~EfcGetMonitorPanCmd() {};
133
134     virtual const char* getCmdName() const
135     { return "EfcGetMonitorPanCmd"; }
136 };
137 class EfcSetMonitorPanCmd : public EfcGenericMonitorCmd
138 {
139 public:
140     EfcSetMonitorPanCmd()
141     : EfcGenericMonitorCmd(eCT_Set, eMoC_Pan) {};
142     virtual ~EfcSetMonitorPanCmd() {};
143
144     virtual const char* getCmdName() const
145     { return "EfcSetMonitorPanCmd"; }
146 };
147
148
149 } // namespace FireWorks
150
151 #endif // FIREWORKS_EFC_CMD_MONITOR_H
Note: See TracBrowser for help on using the browser.