Changeset 5226:3cb3cab29e5e in roaraudio for libroar/simple.c
- Timestamp:
- 11/12/11 13:20:14 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/simple.c
r5225 r5226 62 62 } 63 63 64 int roar_simple_stream(int rate, int channels, int bits, int codec, const char * server, int dir, const char * name) {65 struct roar_stream s;66 67 roar_debug_warn_sysio("roar_simple_stream", "roar_vio_simple_stream", NULL);68 69 return roar_simple_stream_obj(&s, rate, channels, bits, codec, server, dir, name);70 }71 72 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) { 73 65 struct roar_connection con; … … 78 70 79 71 if ( roar_simple_connect(&con, server, name) == -1 ) { 80 ROAR_DBG("roar_simple_ play(*): roar_simple_connect() faild!");81 ROAR_ERR("roar_simple_stream (*): Can not connect to server");72 ROAR_DBG("roar_simple_stream_obj(*): roar_simple_connect() faild!"); 73 ROAR_ERR("roar_simple_stream_obj(*): Can not connect to server"); 82 74 return -1; 83 75 } … … 140 132 141 133 return fh; 142 }143 144 int roar_simple_new_stream (struct roar_connection * con, int rate, int channels, int bits, int codec, int dir) {145 struct roar_stream s;146 int ret;147 148 roar_debug_warn_sysio("roar_simple_new_stream", "roar_vio_simple_new_stream_obj", NULL);149 150 roar_libroar_nowarn();151 ret = roar_simple_new_stream_obj(con, &s, rate, channels, bits, codec, dir);152 roar_libroar_warn();153 154 return ret;155 134 } 156 135 … … 421 400 } 422 401 423 int roar_simple_play(int rate, int channels, int bits, int codec, char * server, char * name) {424 roar_debug_warn_sysio("roar_simple_play", "roar_vio_simple_stream", NULL);425 426 return roar_simple_stream(rate, channels, bits, codec, server, ROAR_DIR_PLAY, name);427 }428 429 int roar_simple_monitor(int rate, int channels, int bits, int codec, char * server, char * name) {430 roar_debug_warn_sysio("roar_simple_monitor", "roar_vio_simple_stream", NULL);431 432 return roar_simple_stream(rate, channels, bits, codec, server, ROAR_DIR_MONITOR, name);433 }434 435 int roar_simple_record(int rate, int channels, int bits, int codec, char * server, char * name) {436 roar_debug_warn_sysio("roar_simple_record", "roar_vio_simple_stream", NULL);437 438 return roar_simple_stream(rate, channels, bits, codec, server, ROAR_DIR_RECORD, name);439 }440 441 int roar_simple_filter(int rate, int channels, int bits, int codec, char * server, char * name) {442 roar_debug_warn_sysio("roar_simple_filter", "roar_vio_simple_stream", NULL);443 444 return roar_simple_stream(rate, channels, bits, codec, server, ROAR_DIR_FILTER, name);445 }446 447 402 int roar_simple_connect_virtual(struct roar_connection * con, struct roar_stream * s, int parent, int dir) { 448 403 struct roar_stream parent_stream; … … 473 428 } 474 429 475 int roar_simple_close(int fh) {476 roar_debug_warn_sysio("roar_simple_close", "roar_vio_close", NULL);477 478 #ifdef ROAR_TARGET_WIN32479 closesocket(fh);480 return 0;481 #else482 483 #ifdef ROAR_HAVE_IO_POSIX484 return close(fh);485 #else486 return -1;487 #endif488 489 #endif490 }491 492 int roar_simple_get_standby (int fh) {493 struct roar_connection con;494 495 roar_debug_warn_sysio("roar_simple_get_standby", "roar_get_standby", NULL);496 497 if ( roar_connect_fh(&con, fh) == -1 )498 return -1;499 500 return roar_get_standby(&con);501 }502 503 430 //ll
Note: See TracChangeset
for help on using the changeset viewer.