Changeset 5172:5fb351139e17 in roaraudio


Ignore:
Timestamp:
10/22/11 00:40:00 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

print more usefull error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarfilt.c

    r4708 r5172  
    146146 int    i; 
    147147 int    mul = 1, div = 1; 
     148 int    filter_id; 
    148149 int32_t tmp; 
    149150 float  logscale = 0; 
     
    200201   stream.info.bits     = bits; 
    201202   stream.info.rate     = rate; 
    202    filter++; 
    203    roardsp_filter_init(filter, &stream, roardsp_filter_str2id(argv[++i])); 
    204    roardsp_fchain_add(&fc, filter); 
     203   filter_id = roardsp_filter_str2id(argv[++i]); 
     204   if ( filter_id == -1 ) { 
     205    ROAR_WARN("Can not add filter as filter ID is unknown: %s: %s", argv[i], roar_error2str(roar_error)); 
     206   } else { 
     207    filter++; 
     208    if ( roardsp_filter_init(filter, &stream, filter_id) == -1 ) { 
     209     ROAR_WARN("Can not add filter: %s: %s", argv[i], roar_error2str(roar_error)); 
     210     filter--; 
     211    } else { 
     212     roardsp_fchain_add(&fc, filter); 
     213    } 
     214   } 
    205215  } else if ( strcmp(k, "--ffreq") == 0 ) { 
    206216   lp = atof(argv[++i]); 
Note: See TracChangeset for help on using the changeset viewer.