Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4745
Modified Files:
Tag: Audacity_UmixIt
WaveTrack.cpp
Log Message:
backport improved spectrum prefs display-update fix for client
Index: WaveTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/WaveTrack.cpp,v
retrieving revision 1.51.2.2.2.7
retrieving revision 1.51.2.2.2.8
diff -u -d -r1.51.2.2.2.7 -r1.51.2.2.2.8
--- WaveTrack.cpp 24 Jan 2009 05:59:27 -0000 1.51.2.2.2.7
+++ WaveTrack.cpp 5 Feb 2009 22:56:35 -0000 1.51.2.2.2.8
@@ -60,6 +60,7 @@
public:
SpecCache(int cacheLen, int viewHeight, bool autocorrelation)
{
+ maxFreqOld = -1;
dirty = -1;
start = -1.0;
pps = 0.0;
@@ -76,6 +77,7 @@
delete[] where;
}
+ int maxFreqOld;
int dirty;
int height;
bool ac;
@@ -594,7 +596,9 @@
double t0, double pixelsPerSecond,
bool autocorrelation)
{
+ int maxFreq = gPrefs->Read(wxT("/Spectrum/MaxFreq"), 8000L);;
if (mSpecCache &&
+ mSpecCache->maxFreqOld == maxFreq &&
mSpecCache->dirty == mDirty &&
mSpecCache->start == t0 &&
mSpecCache->ac == autocorrelation &&
@@ -626,6 +630,7 @@
// with the current one, re-use as much of the cache as
// possible
if (oldCache->dirty == GetDirty() &&
+ oldCache->maxFreqOld == maxFreq &&
oldCache->pps == pixelsPerSecond &&
oldCache->height == height &&
oldCache->ac == autocorrelation &&
@@ -659,9 +664,9 @@
defaultMaxFreq = 1000;
defaultFFTSize = 4096;
#endif
- int maxFreqPref = gPrefs->Read("/Spectrum/MaxFreq", defaultMaxFreq);
int windowSize = gPrefs->Read("/Spectrum/FFTSize", defaultFFTSize);
float *buffer = new float[windowSize];
+ mSpecCache->maxFreqOld = maxFreq;
for (x = 0; x < mSpecCache->len; x++)
if (recalc[x]) {
@@ -687,7 +692,7 @@
start, len);
ComputeSpectrum(buffer, windowSize, height,
- maxFreqPref, windowSize,
+ maxFreq, windowSize,
mRate, &mSpecCache->freq[height * x],
autocorrelation);
}
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs