Move methods

This commit is contained in:
xenakios 2018-11-15 20:48:49 +02:00
parent e5af6e1da1
commit 7cb3ec78b6
2 changed files with 13 additions and 9 deletions

View File

@ -139,6 +139,11 @@ void FFT::applywindow(FFTWindow type)
for (int i=0;i<nsamples;i++) smp[i]*=window.data[i]; for (int i=0;i<nsamples;i++) smp[i]*=window.data[i];
} }
void FFT::setPhaseRefreshRate(int rate)
{
m_phaserefreshrate = rate;
}
void FFT::updatePhases() void FFT::updatePhases()
{ {
for (int i = 1; i < nsamples / 2; i++) for (int i = 1; i < nsamples / 2; i++)
@ -376,6 +381,12 @@ void Stretch::here_is_onset(REALTYPE onset){
}; };
}; };
void Stretch::setPhaseRefreshRate(int rate)
{
jassert(fft != nullptr);
fft->setPhaseRefreshRate(rate);
}
int Stretch::get_nsamples(REALTYPE current_pos_percents){ int Stretch::get_nsamples(REALTYPE current_pos_percents){
if (bypass) return bufsize; if (bypass) return bufsize;
if (freezing) return 0; if (freezing) return 0;

View File

@ -128,10 +128,7 @@ class FFT
int nsamples=0; int nsamples=0;
void setPhaseRefreshRate(int rate) void setPhaseRefreshRate(int rate);
{
m_phaserefreshrate = rate;
}
private: private:
@ -174,11 +171,7 @@ class Stretch
freezing=new_freezing; freezing=new_freezing;
}; };
bool isFreezing() { return freezing; } bool isFreezing() { return freezing; }
void setPhaseRefreshRate(int rate) void setPhaseRefreshRate(int rate);
{
jassert(fft != nullptr);
fft->setPhaseRefreshRate(rate);
}
std::vector<REALTYPE> out_buf;//pot sa pun o variabila "max_out_bufsize" si asta sa fie marimea lui out_buf si pe out_bufsize sa il folosesc ca marime adaptiva std::vector<REALTYPE> out_buf;//pot sa pun o variabila "max_out_bufsize" si asta sa fie marimea lui out_buf si pe out_bufsize sa il folosesc ca marime adaptiva
int get_nsamples(REALTYPE current_pos_percents);//how many samples are required int get_nsamples(REALTYPE current_pos_percents);//how many samples are required