The functions wxString::Format, wxString::Printf (and others indirectly) have become stricter about parameter types that don't match (format specifier vs. function parameters). So the bugs (that were already present in audacity before) become visible in wx3.0 as error message dialogs. I've checked all occurrences of Printf, wxPrintf, PrintfV, Format, FormatV, wxLogDebug and wxLogError systematically and made the type match.
Note: In Shuttle.cpp this patch supersedes one related change done in r13466 because a wxLongLong_t can be bigger than an int and in a generic function like "TransferLongLong" this should be taken into account.
For Resample.* and QualityPrefs.cpp, this commit has my restructuring for distinguishing constant-rate vs variable-rate resamplers more generally. I think it's complete and ready for const-rate, but I have more review and testing to do for the var-rate cases.
Variable-rate resampling is not implemented here, so Time Tracks are still broken, but this is a milestone in getting to a more general and correct structure.
Also I think this fixes AboutDialog issues Steve noticed.
* 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.
* Fix memory leaks.
* Add comments about initializations and checking for successful results.
* Add checks for NULL deref.
* Consistency in "TODO" vs "TO-DO" comments!
Correct Sequence::ConvertToSampleFormat() errors resulting in wrong block file sizes, per offline discussions with Martyn and James.
In WaveClip::ConvertToSampleFormat(), distinguish between failure and no change.
Changed deprecated calls to wxArray::Count() to GetCount(),
In Sequence::Blockify(), no reason to call Alloc() if we know we have no samples, so rearranged that code.
Changes per Martyn's suggestion (http://bugzilla.audacityteam.org/show_bug.cgi?id=451#c24), i.e., deal with sample format mismatch in WaveClip::Paste() and Sequence::Paste().
Also add error checking for bad s parameter values passed to Sequence::Paste().