Changeset 1141:37c25717fca0 in roaraudio for libroardsp/filter_add.c
- Timestamp:
- 01/21/09 22:51:58 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroardsp/filter_add.c
r979 r1141 27 27 int roardsp_add_init (struct roardsp_filter * filter, struct roar_stream * stream, int id) { 28 28 struct roardsp_amp * self = malloc(sizeof(struct roardsp_amp)); 29 int32_t fac;30 29 31 30 if ( self == NULL ) … … 36 35 filter->inst = (void*) self; 37 36 38 fac = 0; 39 roardsp_amp_ctl(filter, ROARDSP_FCTL_MUL, &fac); 40 fac = 1; 41 roardsp_amp_ctl(filter, ROARDSP_FCTL_DIV, &fac); 37 roardsp_filter_reset(filter, ROARDSP_RESET_FULL); 42 38 43 39 return 0; … … 56 52 } 57 53 54 int roardsp_add_reset (struct roardsp_filter * filter, int what) { 55 struct roardsp_amp * self; 56 57 if ( filter == NULL ) 58 return -1; 59 60 if ( filter->inst == NULL ) 61 return -1; 62 63 self = filter->inst; 64 65 switch (what) { 66 case ROARDSP_RESET_NONE: 67 case ROARDSP_RESET_STATE: 68 return 0; 69 break; 70 case ROARDSP_RESET_FULL: 71 self->mul = 0; 72 self->div = 1; 73 return 0; 74 break; 75 default: 76 return -1; 77 } 78 79 return -1; 80 } 81 58 82 //ll
Note: See TracChangeset
for help on using the changeset viewer.