root/branches/streaming-rework/src/libstreaming/AmdtpPortInfo.h

Revision 404, 2.9 kB (checked in by pieterpalmers, 17 years ago)

- introduce support framework for DICE and Metric Halo
- change probe/discovery code to make adding devices easier
- made conditional compilation effectively work.

./configure now has the following switches:

--enable-bebob build BeBoB support (default=yes)
--enable-motu build Motu support (default=no)
--enable-dice build DICE support (default=no)
--enable-metric-halo build Metric Halo support (note: completely useless)

(default=no)

--enable-rme build RME support (note: completely useless)

(default=no)

--enable-bounce build Bounce device support (default=no)
--enable-all-devices build support for all supported devices (default=no)

these now turn on/off compilation effectively.

Line 
1 /* $Id$ */
2
3 /*
4  *   FreeBob Streaming API
5  *   FreeBob = Firewire (pro-)audio for linux
6  *
7  *   http://freebob.sf.net
8  *
9  *   Copyright (C) 2005,2006,2007 Pieter Palmers <pieterpalmers@users.sourceforge.net>
10  *
11  *   This program is free software {} you can redistribute it and/or modify
12  *   it under the terms of the GNU General Public License as published by
13  *   the Free Software Foundation {} either version 2 of the License, or
14  *   (at your option) any later version.
15  *
16  *   This program is distributed in the hope that it will be useful,
17  *   but WITHOUT ANY WARRANTY {} without even the implied warranty of
18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *   GNU General Public License for more details.
20  *
21  *   You should have received a copy of the GNU General Public License
22  *   along with this program {} if not, write to the Free Software
23  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  *
25  *
26  *
27  */
28  
29 #ifdef ENABLE_BEBOB
30     #ifndef ENABLE_AMDTP_SP
31         #define ENABLE_AMDTP_SP
32     #endif
33 #endif
34
35 #ifdef ENABLE_DICE
36     #ifndef ENABLE_AMDTP_SP
37         #define ENABLE_AMDTP_SP
38     #endif
39 #endif
40
41 #ifdef ENABLE_BOUNCE
42     #ifndef ENABLE_AMDTP_SP
43         #define ENABLE_AMDTP_SP
44     #endif
45 #endif
46
47 #ifdef ENABLE_AMDTP_SP
48
49 #ifndef __FREEBOB_AMDTPPORTINFO__
50 #define __FREEBOB_AMDTPPORTINFO__
51
52 #include "../debugmodule/debugmodule.h"
53 #include <string>
54
55 namespace FreebobStreaming {
56 /*!
57 \brief Class containing the stream information for an AMDTP channel
58
59  Contains the information that maps the port to an AMDTP stream position (i.e. channel)
60  this allows the AMDTP stream demultiplexer to find the channel associated
61  to this port.
62  
63 */
64 class AmdtpPortInfo {
65
66 public:
67     /**
68      * Sometimes a channel can have multiple formats, depending on the
69      * device configuration (e.g. an SPDIF port could be plain audio in 24bit integer
70      * or AC3 passthrough in IEC compliant frames.)
71      *
72      * This kind of enum allows to discriminate these formats when decoding
73      * If all channels always have the same format, you won't be needing this
74      */
75         enum E_Formats {
76                 E_MBLA, ///< multibit linear audio
77                 E_Midi, ///< midi
78                 E_SPDIF,///< IEC.... format
79         };
80         enum E_Types {
81
82         };
83
84         AmdtpPortInfo(std::string name, int position, int location, enum E_Formats format, int type)
85           : m_name(name), m_position(position), m_location(location), m_format(format), m_type(type)
86         {};
87         virtual ~AmdtpPortInfo() {};
88
89
90         std::string getName() {return m_name;};
91         int getLocation()     {return m_location;};
92         int getPosition()     {return m_position;};
93         enum E_Formats getFormat()       {return m_format;};
94         int getType()         {return m_type;};
95
96 protected:
97     std::string m_name;
98
99     int m_position;
100     int m_location;
101     enum E_Formats m_format;
102     int m_type;
103
104 };
105
106 } // end of namespace FreebobStreaming
107
108 #endif /* __FREEBOB_AMDTPPORTINFO__ */
109
110 #endif // #ifdef ENABLE_AMDTP_SP
Note: See TracBrowser for help on using the browser.