Changeset 5227:beb26bba0901 in roaraudio
- Timestamp:
- 11/12/11 13:26:38 (12 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroar/vio_dstr.h
r4956 r5227 197 197 int roar_vio_open_default (struct roar_vio_calls * calls, struct roar_vio_defaults * def, char * opts); 198 198 199 int roar_vio_open_dstr (struct roar_vio_calls * calls, c har * dstr, struct roar_vio_defaults * def, int dnum);200 int roar_vio_open_dstr_vio(struct roar_vio_calls * calls, c har * dstr, struct roar_vio_defaults * def, int dnum, struct roar_vio_calls * vio);199 int roar_vio_open_dstr (struct roar_vio_calls * calls, const char * dstr, struct roar_vio_defaults * def, int dnum); 200 int roar_vio_open_dstr_vio(struct roar_vio_calls * calls, const char * dstr, struct roar_vio_defaults * def, int dnum, struct roar_vio_calls * vio); 201 201 202 202 int roar_vio_dstr_parse_opts(struct roar_vio_dstr_chain * chain); -
include/libroar/vs.h
r5109 r5227 79 79 /* Open a file and attach it. 80 80 */ 81 int roar_vs_file_simple(roar_vs_t * vss, c har * filename, int * error) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL(1, 2);81 int roar_vs_file_simple(roar_vs_t * vss, const char * filename, int * error) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL(1, 2); 82 82 83 83 /* Connects to a server to just play a file. 84 84 */ 85 roar_vs_t * roar_vs_new_from_file(const char * server, const char * name, c har * filename, int * error) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL(3);85 roar_vs_t * roar_vs_new_from_file(const char * server, const char * name, const char * filename, int * error) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL(3); 86 86 87 87 /* Switch to buffered mode. -
libroar/vio_dstr.c
r4984 r5227 360 360 #endif 361 361 362 int roar_vio_open_dstr (struct roar_vio_calls * calls, c har * dstr, struct roar_vio_defaults * def, int dnum) {362 int roar_vio_open_dstr (struct roar_vio_calls * calls, const char * dstr, struct roar_vio_defaults * def, int dnum) { 363 363 return roar_vio_open_dstr_vio(calls, dstr, def, dnum, NULL); 364 364 } 365 365 366 #define _ret(x) do { int _err = roar_error; roar_mm_free(dstr ); roar_error = _err; roar_err_to_errno(); return (x); } while (0)366 #define _ret(x) do { int _err = roar_error; roar_mm_free(dstr_copy); roar_error = _err; roar_err_to_errno(); return (x); } while (0) 367 367 368 368 int roar_vio_open_dstr_vio(struct roar_vio_calls * calls, 369 c har * dstr, struct roar_vio_defaults * def, int dnum,369 const char * dstr, struct roar_vio_defaults * def, int dnum, 370 370 struct roar_vio_calls * vio) { 371 371 #ifndef ROAR_WITHOUT_VIO_DSTR 372 372 struct roar_vio_dstr_chain chain[ROAR_VIO_DSTR_MAX_OBJ_PER_CHAIN]; 373 char * dstr_copy; 373 374 char * next; 374 375 char * this; … … 387 388 return -1; 388 389 389 if ( (dstr = roar_mm_strdup(dstr)) == NULL )390 if ( (dstr_copy = roar_mm_strdup(dstr)) == NULL ) 390 391 return -1; 391 392 … … 394 395 chain[0].type = ROAR_VIO_DSTR_OBJT_INTERNAL; 395 396 396 next = dstr ;397 next = dstr_copy; 397 398 398 399 while (next != NULL) { -
libroar/vs.c
r5199 r5227 408 408 } 409 409 410 int roar_vs_file_simple(roar_vs_t * vss, c har * filename, int * error) {410 int roar_vs_file_simple(roar_vs_t * vss, const char * filename, int * error) { 411 411 struct roar_vio_defaults def; 412 412 struct roar_vio_calls * file; … … 495 495 } 496 496 497 roar_vs_t * roar_vs_new_from_file(const char * server, const char * name, c har * filename, int * error) {497 roar_vs_t * roar_vs_new_from_file(const char * server, const char * name, const char * filename, int * error) { 498 498 roar_vs_t * vss = roar_vs_new(server, name, error); 499 499
Note: See TracChangeset
for help on using the changeset viewer.