.\"Copyright 2010 (c) EPFL .TH RTF_CREATE_DOWNSAMPLER 3 2010 "EPFL" "rtfilter library" .SH NAME rtf_create_downsampler - Creates downsampling filter .SH SYNOPSIS .LP .B #include .sp .BI "hfilter rtf_create_downsampler(unsigned int " nch ", int " type "," .br .BI " unsigned int " r ");" .br .SH DESCRIPTION .LP \fBrtf_create_downsampler\fP() creates a filter that downsamples signals coming from \fInch\fP channels of type \fItype\fP (see \fBrtf_create_filter\fP(3)) by a decimation factor of \fIr\fP (i.e. the sampling frequency of the input will be \fIr\fP times the sampling frequency of the output). This is achieved internally by applying a lowpass 4-order Chebychev filter to the input data using a normalized cutoff frequency of 0.8/(2*\fIr\fP) and decimating the result every \fIr\fP samples. .SH "RETURN VALUE" .LP Returns the handle to the created filter in case of success, NULL otherwise. .SH NOTES .LP On the contrary of most other filters, the number of samples returned by \fBrtf_filter\fP(3) is different than the input (as expected) but also may vary at each call if the number of sample supplied in input is not a multiple of \fIr\fP. .SH "SEE ALSO" .BR rtf_filter (3), .BR rtf_create_filter (3), .BR rtf_destroy_filter (3)