Changeset 1141:37c25717fca0 in roaraudio for libroardsp/filter_amp.c
- Timestamp:
- 01/21/09 22:51:58 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroardsp/filter_amp.c
r882 r1141 27 27 int roardsp_amp_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 = 1; 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; … … 103 99 } 104 100 101 int roardsp_amp_reset (struct roardsp_filter * filter, int what) { 102 struct roardsp_amp * self; 103 104 if ( filter == NULL ) 105 return -1; 106 107 if ( filter->inst == NULL ) 108 return -1; 109 110 self = filter->inst; 111 112 switch (what) { 113 case ROARDSP_RESET_NONE: 114 case ROARDSP_RESET_STATE: 115 return 0; 116 break; 117 case ROARDSP_RESET_FULL: 118 self->mul = 1; 119 self->div = 1; 120 return 0; 121 break; 122 default: 123 return -1; 124 } 125 126 return -1; 127 } 128 105 129 //ll
Note: See TracChangeset
for help on using the changeset viewer.