... Also removed one line from the track control drop-down, and changed
accelerators to more mnemonic choices.
Also the open page of View Settings... determines track view type after OK
... SpectrogramSettings does that instead, and Preferences or View Settings
are the user interface for changing it.
Handle invalidation of spectrogram pixel cache for scale type changes,
just as for other changes of settings. No more
TrackArtist::InvalidateSpectrumCache().
View type of track now switches to Spectrum when applying or OKing the
View Settings... dialog and the Spectrogram page is open (and for now
it is still the only page)
... With a careful sweep of uses of WaveTrack::GetDisplay() to remove
assumptions about the ordering of the values.
Using < and <= on enum values is mostly a bad idea.
Create WaveTrackCache as a utility class but don't use it anywhere yet.
The possible minor performance problem with effects is fixed by changes
in WaveTrack::GetBestBlockSize().
This changes the autosave XML file to a binary representation
during writing to speed up autosave processing. A lot of the
time used during autosave is a result of having to convert and
print all of the values to the XML file.
Writing the same information, but in binary format, reduces
all of that to just the bare essentials and the actual write
I/O.
During recovery, the binary file is read and converted to
the real xML representation and processing happens as it
did before.
It is a noticeable difference with very long or many tracks.
The included fix has to do with append recording.
Say you have 3 tracks and you want to append recorded audio
to the middle track. Sometime later Audacity crashes and
upon recovery, the recorded audio is actually appended to
the third track, not the second one.
This fixes that by adding an "autosaveid" to each track as
it is written to the autosave file. The same ID is written
to the recording recovery appends to the autosave file.
Then, during recovery, the IDs are matched up and the audio
gets appended to the proper track.
These autosaveid attributes are only present in the autosave
file and not in saved project files.
This relies on three new nyquist scripts to actually do the editing. The peak-snapping code in FrequencyWindow has been extracted into a new class, SpectrumAnalyst, to provide peak-snapping in spectrogram too.
* Fix P2 bug described by Bill Wharrie in "Problem dragging clips between tracks with different sample rates" thread on audacity-quality. Made sure the clips get resampled to the destination WaveTrack rate, and marked changed.
* Comment out unused override of WaveTrack::MoveClipToTrack().
* Added an ANSWER-ME about what appears to be a useless declaration and assignment.
In WaveClip.cpp, remove wxASSERT that Michael was trying to convince me to do yesterday. In debugging this, found a case when it's not a bad call. Thanks, Michael! :-)
In TrackPanel.cpp, removed some cruft.
better handling of error conditions in all BuildFromXML methods, per comment:
// BuildFromXML methods should always return a BlockFile, not NULL,
// even if the result is flawed (e.g., refers to nonexistent file),
// as testing will be done in DirManager::ProjectFSCK().