1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-17 14:11:13 +01:00

Use WaveTrackCache for spectrograms

Zooming-in of spectrograms (or other view changes that invalidate the
whole pixel cache of the WaveClip) used to do at least one opening and
closing of a block file for each column of pixels.  With this change,
open each block file not more than once for each repopulation of the
cache.

Improved speed may be more noticeable on less powerful computers, or when
the audio file is in a slower storage device.
This commit is contained in:
Paul Licameli
2015-05-26 18:11:36 -04:00
parent bdc2839112
commit e6ccd51326
4 changed files with 54 additions and 28 deletions

View File

@@ -29,6 +29,7 @@ class wxHashTable;
class Track;
class WaveTrack;
class WaveTrackCache;
class WaveClip;
class NoteTrack;
class LabelTrack;
@@ -141,7 +142,7 @@ class AUDACITY_DLL_API TrackArtist {
bool drawEnvelope, bool drawSamples, bool drawSliders,
bool dB, bool muted);
void DrawClipSpectrum(WaveTrack *track, WaveClip *clip,
void DrawClipSpectrum(WaveTrackCache &cache, WaveClip *clip,
wxDC & dc, const wxRect & r, const ViewInfo *viewInfo,
bool autocorrelation, bool logF);