SPRAAK
|
Monitor the recording volume. More...
Data Structures | |
struct | SprAGCInfo |
Functions | |
void | spr_agc_free (SprSspInfo *Info) |
int | spr_agc_setup (SprSspInfo *Info, const char **descript, void *aux_info) |
int | spr_agc_process (SprSspInfo *Info, const void *frame_in, void *frame_out) |
void | spr_agc_reset (SprSspInfo *Info, SprSspStatus *action) |
int | spr_agc_connect (SprSspDesc *ssp_des, const char *agc_name, void(*func)(SprAGCInfo *), void *ext_info, int query_sz[5]) |
Monitor the recording volume.
Monitors the input data and puts histogram counts concerning the sample values in a global buffer of the type AGCinfo. If a certain amount of data is processed (configurable), a function is called (see connect_agc) which can adapt the record volume (or any other parameter) based on this histogram. A histogram of the index of the highest bit in the absolute value of the scaled samples is made. The samples are scaled so that anything higher that the maximum range has bit 16 set. The input should be of the type SHORT. The output is of the type FLOAT, and equals the input data multiplied by some gain factor.
[agc] | |
---|---|
name <name>(AGC) | |
Give a name to this AGC-block. See attach_agc() for more information. | |
DC-comp <yes/no>(no) | |
Do DC-compensation | |
fragment size <nframes>(25) | |
Output a new histogram evere <nframes> frames. | |
fragment combine <nfrag>(2) | |
Output histograms that correspond to the <nframes>*<nfrag> most recent frames. | |
adapt skip <nskipa>(5) | |
Do not update the history information the first <nskipa> frames after a gain adapt. | |
start skip <nskips>(5) | |
Do not update the history information the first <nskips> frames of a new file. | |
clip threshold <thresh>(25600) | |
Sample larger or equal (in absolute value) than this threshold are counted as clipped. | |
reset new file <yes/no>(no) | |
Reset histogram counts at the beginning of each new file. | |
reset gain adapt <yes/no>(no) | |
Reset histogram counts after a gain adapt. |