Browse Source

cleanup

master
Nasca Octavian PAUL 13 years ago
parent
commit
29d28c1dc6
2 changed files with 15 additions and 4 deletions
  1. +13
    -3
      ProcessedStretch.cpp
  2. +2
    -1
      ProcessedStretch.h

+ 13
- 3
ProcessedStretch.cpp View File

@@ -125,11 +125,11 @@ ProcessedStretch::ProcessedStretch(REALTYPE rap_,int in_bufsize_,FFTWindow w,boo
sumfreq=new REALTYPE[nfreq];
tmpfreq1=new REALTYPE[nfreq];
tmpfreq2=new REALTYPE[nfreq];
fbfreq=new REALTYPE[nfreq];
//fbfreq=new REALTYPE[nfreq];
free_filter_freqs=new REALTYPE[nfreq];
for (int i=0;i<nfreq;i++) {
free_filter_freqs[i]=1.0;
fbfreq[i]=0.0;
// fbfreq[i]=0.0;
};
};
ProcessedStretch::~ProcessedStretch(){
@@ -138,7 +138,7 @@ ProcessedStretch::~ProcessedStretch(){
delete [] tmpfreq1;
delete [] tmpfreq2;
delete [] free_filter_freqs;
delete [] fbfreq;
// delete [] fbfreq;
};

void ProcessedStretch::set_parameters(ProcessParameters *ppar){
@@ -155,6 +155,10 @@ void ProcessedStretch::add(REALTYPE *freq2,REALTYPE *freq1,REALTYPE a){
for (int i=0;i<nfreq;i++) freq2[i]+=freq1[i]*a;
};

void ProcessedStretch::mul(REALTYPE *freq1,REALTYPE a){
for (int i=0;i<nfreq;i++) freq1[i]*=a;
};

void ProcessedStretch::zero(REALTYPE *freq1){
for (int i=0;i<nfreq;i++) freq1[i]=0.0;
};
@@ -178,6 +182,10 @@ REALTYPE ProcessedStretch::get_stretch_multiplier(REALTYPE pos_percents){
};

void ProcessedStretch::process_spectrum(REALTYPE *freq){
//REALTYPE fb=0.8;
//add(freq,fbfreq,fb);

if (pars.harmonics.enabled) {
copy(freq,infreq);
do_harmonics(infreq,freq);
@@ -223,6 +231,8 @@ void ProcessedStretch::process_spectrum(REALTYPE *freq){
do_compressor(infreq,freq);
};

// copy(freq,fbfreq);
// mul(freq,1.0-fb);
};

//void ProcessedStretch::process_output(REALTYPE *smps,int nsmps){


+ 2
- 1
ProcessedStretch.h View File

@@ -162,6 +162,7 @@ class ProcessedStretch:public Stretch{

void copy(REALTYPE *freq1,REALTYPE *freq2);
void add(REALTYPE *freq2,REALTYPE *freq1,REALTYPE a=1.0);
void mul(REALTYPE *freq1,REALTYPE a);
void zero(REALTYPE *freq1);
void spread(REALTYPE *freq1,REALTYPE *freq2,REALTYPE spread_bandwidth);

@@ -172,7 +173,7 @@ class ProcessedStretch:public Stretch{
ProcessParameters pars;

REALTYPE *infreq,*sumfreq,*tmpfreq1,*tmpfreq2;
REALTYPE *fbfreq;
//REALTYPE *fbfreq;
};

#endif


Loading…
Cancel
Save