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

Revision 404, 2.6 kB (checked in by pieterpalmers, 16 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 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 #ifdef ENABLE_MOTU
29
30 #ifndef __FREEBOB_MOTUPORTINFO__
31 #define __FREEBOB_MOTUPORTINFO__
32
33 #include "../debugmodule/debugmodule.h"
34 #include <string>
35
36 namespace FreebobStreaming {
37 /*!
38 \brief Class containing the stream information for a Motu channel
39
40  Contains the information that enables the decoding routine to find
41  this port's data in the ISO events
42
43 */
44 class MotuPortInfo {
45
46 public:
47     /**
48      * Sometimes a channel can have multiple formats, depending on the
49      * device configuration (e.g. an SPDIF port could be plain audio in 24bit integer
50      * or AC3 passthrough in IEC compliant frames.)
51      *
52      * This kind of enum allows to discriminate these formats when decoding
53      * If all channels always have the same format, you won't be needing this
54      */
55 //      enum E_Formats {
56 //              E_MBLA,     // Multibit linear audio
57 //              E_Midi,     // MIDI
58 //      };
59    
60         /**
61          * Initialize Motu portinfo
62          * should not be called directly, is inherited by motu ports
63          *
64          * the position parameter is an example
65          * the name parameter is mandatory
66          *
67          * @param name Port name
68          * @param position Start position of port's data in iso event
69          * @param format Format of data in iso event
70          * @param size Size in bits of port's data in iso event
71          * @return
72          */
73         MotuPortInfo(std::string name, int position, int size)
74           : m_name(name), m_position(position), m_size(size)
75         {};
76         virtual ~MotuPortInfo() {};
77
78
79         std::string getName() {return m_name;};
80         int getPosition()     {return m_position;};
81         int getSize()         {return m_size;};
82
83 protected:
84     std::string m_name;
85
86     int m_position;
87     int m_size;
88
89 };
90
91 } // end of namespace FreebobStreaming
92
93 #endif /* __FREEBOB_MOTUPORTINFO__ */
94
95 #endif //#ifdef ENABLE_MOTU
96
Note: See TracBrowser for help on using the browser.