Changeset 665:3fea6696e14b in roaraudio
- Timestamp:
- 08/26/08 19:37:39 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroardsp/filter.c
r663 r665 24 24 25 25 #include "libroardsp.h" 26 27 struct _roardsp_filterlist { 28 int id; 29 char * name; 30 void (* init )(struct roardsp_filter * filter, struct roar_stream * stream, int id); 31 void (*uninit )(struct roardsp_filter * filter); 32 void (*calc [5][3])(struct roardsp_filter * filter, void * data, size_t samples); 33 } _roardsp_filterlist[] = { 34 {-1, NULL, NULL, NULL, {{NULL, NULL, NULL},{NULL, NULL, NULL},{NULL, NULL, NULL},{NULL, NULL, NULL},{NULL, NULL, NULL}}} 35 }; 36 37 int roardsp_filter_str2id(char * str) { 38 struct _roardsp_filterlist * l = _roardsp_filterlist; 39 40 while ( l->id != -1 ) { 41 if ( strcasecmp(l->name, str) == 0 ) 42 return l->id; 43 } 44 45 return -1; 46 } 47 48 char * roardsp_filter_id2str(int id) { 49 struct _roardsp_filterlist * l = _roardsp_filterlist; 50 51 while ( l->id != -1 ) { 52 if ( l->id == id ) 53 return l->name; 54 } 55 56 return NULL; 57 } 26 58 27 59 int roardsp_filter_init (struct roardsp_filter * filter, struct roar_stream * stream, int id) {
Note: See TracChangeset
for help on using the changeset viewer.