Changeset 5110:1a60f34b8a9f in roaraudio for libroar
- Timestamp:
- 07/30/11 00:09:40 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/simple.c
r5061 r5110 368 368 369 369 int roar_simple_play_file(char * file, char * server, char * name) { 370 struct roar_connection con; 371 372 if ( roar_simple_connect(&con, server, name) == -1 ) { 373 return -1; 374 } 375 376 return roar_file_play(&con, file, 1); // con is closed by this as this stream will be an execed one. 370 roar_vs_t * vss; 371 int err; 372 373 vss = roar_vs_new_from_file(server, name, file, &err); 374 375 if ( vss == NULL ) { 376 roar_err_set(err); 377 return -1; 378 } 379 380 if ( roar_vs_run(vss, &err) == -1 ) { 381 roar_err_set(err); 382 return -1; 383 } 384 385 roar_vs_sync(vss, ROAR_VS_WAIT, NULL); 386 roar_vs_close(vss, ROAR_VS_FALSE, NULL); 387 388 return 0; 377 389 } 378 390 … … 418 430 return -1; 419 431 420 if ( roar_stream_connect (con, s, dir) == -1 )421 return -1; 422 423 if ( roar_stream_set_flags (con, s, ROAR_FLAG_VIRTUAL, 0) == -1 ) {432 if ( roar_stream_connect2(con, s, dir, -1) == -1 ) 433 return -1; 434 435 if ( roar_stream_set_flags2(con, s, ROAR_FLAG_VIRTUAL, ROAR_SET_FLAG) == -1 ) { 424 436 roar_kick(con, ROAR_OT_STREAM, roar_stream_get_id(s)); 425 437 return -1;
Note: See TracChangeset
for help on using the changeset viewer.