Changeset 2904:0b2b372fc50f in roaraudio
- Timestamp:
- 10/11/09 16:13:59 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarinterconnect.c
r2260 r2904 29 29 #endif 30 30 31 #define MT_NONE 0x0031 #define MT_NONE 0x00 32 32 #define MT_MASK 0xF0 33 #define MT_ROAR 0x10 34 #define MT_ESD 0x20 35 #define MT_DEFAULT MT_ROAR 36 37 #define ST_NONE 0x00 38 #define ST_MASK 0x0F 39 #define ST_BIDIR 0x01 40 #define ST_FILTER 0x02 33 #define MT_ROAR 0x10 34 #define MT_ESD 0x20 35 #define MT_DEFAULT MT_ROAR 36 37 #define ST_NONE 0x00 38 #define ST_MASK 0x0F 39 #define ST_BIDIR 0x01 40 #define ST_FILTER 0x02 41 #define ST_TRANSMIT 0x03 42 #define ST_RECEIVE 0x04 41 43 // no default here as the default depend on the server type 42 44 … … 81 83 ret -= ret & ST_MASK; 82 84 ret += ST_FILTER; 85 } else if ( !strcmp(type, "transmit") ) { 86 ret -= ret & ST_MASK; 87 ret += ST_TRANSMIT; 88 } else if ( !strcmp(type, "receive") ) { 89 ret -= ret & ST_MASK; 90 ret += ST_RECEIVE; 83 91 } else { 84 92 return MT_NONE|ST_NONE; … … 119 127 int rfh; 120 128 int i; 129 int localdir = ROAR_DIR_BIDIR; 121 130 122 131 for (i = 1; i < argc; i++) { … … 151 160 switch (type & ST_MASK) { 152 161 case ST_BIDIR: 153 tmp = ROAR_DIR_BIDIR;162 tmp = ROAR_DIR_BIDIR; 154 163 break; 155 164 case ST_FILTER: 156 tmp = ROAR_DIR_FILTER; 165 tmp = ROAR_DIR_FILTER; 166 break; 167 case ST_TRANSMIT: 168 tmp = ROAR_DIR_PLAY; 169 localdir = ROAR_DIR_MONITOR; 170 break; 171 case ST_RECEIVE: 172 tmp = ROAR_DIR_MONITOR; 173 localdir = ROAR_DIR_PLAY; 157 174 break; 158 175 default: … … 219 236 } 220 237 221 if ( roar_stream_connect(con, stream, ROAR_DIR_BIDIR) == -1 ) {238 if ( roar_stream_connect(con, stream, localdir) == -1 ) { 222 239 roar_disconnect(con); 223 240 return 22;
Note: See TracChangeset
for help on using the changeset viewer.