Changeset 3072:309781973ca8 in roaraudio


Ignore:
Timestamp:
01/03/10 20:25:29 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

cleanup of code, use roar_stream_new_by_id()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarctl.c

    r2953 r3072  
    608608 int mode_i = ROAR_META_MODE_SET; 
    609609 
    610  memset(&s, 0, sizeof(s)); 
    611  
    612  s.id = id; 
     610 if ( roar_stream_new_by_id(&s, id) == -1 ) 
     611  return -1; 
    613612 
    614613// printf("set_meta(*): mode='%s', type='%s', val='%s'\n", mode, type, val); 
     
    646645 char * v; 
    647646 
    648  memset(&s, 0, sizeof(s)); 
    649  
    650  s.id = id; 
     647 if ( roar_stream_new_by_id(&s, id) == -1 ) 
     648  return -1; 
    651649 
    652650 if ( (in = fopen(file, "r")) == NULL ) 
     
    690688 struct roar_stream s; 
    691689 
    692  memset(&s, 0, sizeof(s)); 
    693  
    694  s.id = id; 
     690 if ( roar_stream_new_by_id(&s, id) == -1 ) 
     691  return -1; 
    695692 
    696693 meta.type  = roar_meta_inttype(type); 
     
    717714 int len; 
    718715 
    719  memset(&s, 0, sizeof(s)); 
    720  
    721  s.id = id; 
     716 if ( roar_stream_new_by_id(&s, id) == -1 ) 
     717  return -1; 
    722718 
    723719 if ( (len = roar_stream_meta_list(con, &s, types, ROAR_META_MAX_PER_STREAM)) == -1 ) 
     
    738734 FILE * out; 
    739735 
    740  memset(&s, 0, sizeof(s)); 
    741  
    742  s.id = id; 
     736 if ( roar_stream_new_by_id(&s, id) == -1 ) 
     737  return -1; 
    743738 
    744739 if ( (out = fopen(file, "w")) == NULL ) 
     
    774769 struct roar_stream s[1]; 
    775770 
    776  memset(s, 0, sizeof(struct roar_stream)); 
    777  
    778  s->id = id; 
     771 if ( roar_stream_new_by_id(s, id) == -1 ) 
     772  return -1; 
    779773 
    780774 c = strtok(flags, ","); 
Note: See TracChangeset for help on using the changeset viewer.