Mercurial > hg > easaier-soundaccess
changeset 278:65dfc1027ed6
code to freeze music
author | benoitrigolleau |
---|---|
date | Tue, 21 Oct 2008 14:55:26 +0000 |
parents | 960531792d88 |
children | 427272bfec3b |
files | sv/filter/MultiRealTimeFilter.cpp sv/filter/TimeStretchFilter.h |
diffstat | 2 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sv/filter/MultiRealTimeFilter.cpp Thu Oct 16 09:13:21 2008 +0000 +++ b/sv/filter/MultiRealTimeFilter.cpp Tue Oct 21 14:55:26 2008 +0000 @@ -33,6 +33,9 @@ float *pL_mags; ///PREVIOUS FRAME MAGNITUDES float *pR_mags; ///PREVIOUS FRAME MAGNITUDES +float *plotarray; ///STORES HISTOGRAM PLOT FOR SEPARATOR +float *grapharray; ///HIGHER RESOLUTION VERSION OF ABOVE FOR SCREEN PLOTTING + float *L_FFTframe; //Left FFT Frame float *R_FFTframe; //Right FFT Frame @@ -59,6 +62,7 @@ m_timeStretchFilter = new TimeStretchFilter(); m_equalizerFilter = new EqualizerFilter(m_framesize, m_mutex); + m_filterCollection.push_back(m_timeStretchFilter); m_filterCollection.push_back(m_equalizerFilter); @@ -107,6 +111,9 @@ pR_synthphase=(float *)calloc((m_framesize/2), sizeof(float)); peak_locations=(float *)calloc((m_framesize/2), sizeof(float)); + + plotarray=(float *)calloc((200), sizeof(float)); + grapharray=(float *)calloc((400), sizeof(float)); hanning(window, m_framesize); @@ -266,6 +273,8 @@ //-------------------------------------------- + + //EQUALISER CALLS - //Will need a bypass " m_equalizerFilter->bypass()" as below @@ -426,7 +435,15 @@ { skip = m_hop; currentposition += m_hop; + } + + if (m_timeStretchFilter->bypass() == false && m_timeStretchFilter->isFreezed() == true) + { + skip = 0; + currentposition += 0; + } + return skip; }
--- a/sv/filter/TimeStretchFilter.h Thu Oct 16 09:13:21 2008 +0000 +++ b/sv/filter/TimeStretchFilter.h Tue Oct 21 14:55:26 2008 +0000 @@ -49,8 +49,8 @@ inline bool bypass() {return !m_enabled;} inline bool transcheck() {return m_transcheck;} inline bool peakcheck() {return m_peakcheck;} - inline bool freezecheck() {return m_freezecheck;} + inline bool isFreezed() {return m_freezecheck;} inline bool isEnabled() {return m_enabled;}