Changeset 1131:bca464362519 in roaraudio for libroardsp/filterchain.c


Ignore:
Timestamp:
01/20/09 17:57:30 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added support to reset a filter(chain) :), works only for dcblock at the moment :(

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroardsp/filterchain.c

    r679 r1131  
    7878} 
    7979 
     80int roardsp_fchain_reset (struct roardsp_filterchain * chain, int what) { 
     81 int i; 
     82 int ret = 0; 
     83/* 
     84 struct roardsp_filterchain backup[1]; 
     85*/ 
     86 
     87 if ( chain == NULL ) 
     88  return -1; 
     89 
     90/* 
     91 if ( what == ROARDSP_RESET_FULL ) { 
     92  if ( roardsp_fchain_init(backup) == -1 ) 
     93   return -1; 
     94 
     95  if ( roardsp_fchain_uninit(chain) == -1 ) 
     96   return -1; 
     97 
     98  if ( roardsp_fchain_init(chain) == -1 ) 
     99   return -1; 
     100 } else { 
     101*/ 
     102  for (i = 0; i < chain->filters; i++) { 
     103   if ( roardsp_filter_reset(chain->filter[i], what) == -1 ) 
     104    ret = -1; 
     105  } 
     106/* 
     107 } 
     108*/ 
     109 
     110 return ret; 
     111} 
     112 
    80113int roardsp_fchain_num   (struct roardsp_filterchain * chain) { 
    81114 if ( chain == NULL ) 
Note: See TracChangeset for help on using the changeset viewer.