Changeset 5289:ddb3677af4d0 in roaraudio for libroar/simple.c
- Timestamp:
- 11/22/11 14:47:44 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/simple.c
r5238 r5289 36 36 #include "libroar.h" 37 37 38 static int roar_simple_stream_obj (struct roar_stream * s, uint32_t rate, uint32_t channels, uint32_t bits, uint32_t codec, const char * server, int dir, const char * name, int mixer) _LIBROAR_ATTR_DEPRECATED; 39 38 40 int roar_simple_connect (struct roar_connection * con, const char * server, const char * name) { 39 41 return roar_simple_connect2(con, server, name, 0, 0); … … 62 64 } 63 65 64 int roar_simple_stream_obj (struct roar_stream * s, int rate, int channels, int bits, int codec, const char * server, int dir, const char * name) {66 static int roar_simple_stream_obj (struct roar_stream * s, uint32_t rate, uint32_t channels, uint32_t bits, uint32_t codec, const char * server, int dir, const char * name, int mixer) { 65 67 struct roar_connection con; 66 68 int ret; … … 82 84 } 83 85 84 if ( roar_stream_connect(&con, s, dir, -1) == -1 ) {86 if ( roar_stream_connect(&con, s, dir, mixer) == -1 ) { 85 87 safe_error = roar_error; 86 88 roar_disconnect(&con); … … 115 117 } 116 118 117 int roar_simple_new_stream_attachexeced_obj (struct roar_connection * con, struct roar_stream * s, int rate, int channels, int bits, int codec, int dir) {119 int roar_simple_new_stream_attachexeced_obj (struct roar_connection * con, struct roar_stream * s, uint32_t rate, uint32_t channels, uint32_t bits, uint32_t codec, int dir, int mixer) { 118 120 int fh; 119 121 120 122 if ( (fh = roar_simple_stream_obj(s, rate, channels, bits, codec, NULL /* server, we hope this is ok here... */, 121 dir, "libroar temp stream" )) == -1 )123 dir, "libroar temp stream", mixer)) == -1 ) 122 124 return -1; 123 125 … … 134 136 } 135 137 136 int roar_simple_new_stream_obj (struct roar_connection * con, struct roar_stream * s, int rate, int channels, int bits, int codec, int dir) {138 int roar_simple_new_stream_obj (struct roar_connection * con, struct roar_stream * s, uint32_t rate, uint32_t channels, uint32_t bits, uint32_t codec, int dir, int mixer) { 137 139 struct roar_libroar_config * config = roar_libroar_get_config(); 138 140 char file[80] = {0}; … … 171 173 if ( config != NULL ) { 172 174 if ( config->workaround.workarounds & ROAR_LIBROAR_CONFIG_WAS_USE_EXECED ) { 173 return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir );175 return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer); 174 176 } 175 177 } … … 254 256 } 255 257 256 if ( roar_stream_connect(con, s, dir, -1) == -1 ) {258 if ( roar_stream_connect(con, s, dir, mixer) == -1 ) { 257 259 return -1; 258 260 } … … 281 283 return -1; 282 284 283 return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir );285 return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer); 284 286 } 285 287 … … 310 312 return -1; 311 313 312 return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir );314 return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer); 313 315 } else { // seems like we have a positive reply. So we retry the listen socket: 314 316 FD_ZERO(&fds); … … 323 325 return -1; 324 326 325 return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir );327 return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer); 326 328 } 327 329 }
Note: See TracChangeset
for help on using the changeset viewer.