int InitGainAnalysis ( long samplefreq ) { if (ResetSampleFrequency(samplefreq) != INIT_GAIN_ANALYSIS_OK) { return INIT_GAIN_ANALYSIS_ERROR; } linpre = linprebuf + MAX_ORDER; rinpre = rinprebuf + MAX_ORDER; lstep = lstepbuf + MAX_ORDER; rstep = rstepbuf + MAX_ORDER; lout = loutbuf + MAX_ORDER; rout = routbuf + MAX_ORDER; memset ( B, 0, sizeof(B) ); return INIT_GAIN_ANALYSIS_OK; }
int InitGainAnalysis(replaygain_t * rgData, long samplefreq) { if (ResetSampleFrequency(rgData, samplefreq) != INIT_GAIN_ANALYSIS_OK) { return INIT_GAIN_ANALYSIS_ERROR; } rgData->linpre = rgData->linprebuf + MAX_ORDER; rgData->rinpre = rgData->rinprebuf + MAX_ORDER; rgData->lstep = rgData->lstepbuf + MAX_ORDER; rgData->rstep = rgData->rstepbuf + MAX_ORDER; rgData->lout = rgData->loutbuf + MAX_ORDER; rgData->rout = rgData->routbuf + MAX_ORDER; memset(rgData->B, 0, sizeof(rgData->B)); return INIT_GAIN_ANALYSIS_OK; }
int InitGainAnalysis (GainHandle_t **handle, long samplefreq ) { *handle = malloc(sizeof(GainHandle_t)); if (ResetSampleFrequency(*handle, samplefreq) != INIT_GAIN_ANALYSIS_OK) { return INIT_GAIN_ANALYSIS_ERROR; } (*handle)->linpre = (*handle)->linprebuf + MAX_ORDER; (*handle)->rinpre = (*handle)->rinprebuf + MAX_ORDER; (*handle)->lstep = (*handle)->lstepbuf + MAX_ORDER; (*handle)->rstep = (*handle)->rstepbuf + MAX_ORDER; (*handle)->lout = (*handle)->loutbuf + MAX_ORDER; (*handle)->rout = (*handle)->routbuf + MAX_ORDER; //memset((*handle)->B, 0, sizeof((*handle)->B)); return INIT_GAIN_ANALYSIS_OK; }