mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-05 06:39:26 +02:00
Dealt with (and tested) some FIX-MEs and ANSWER-MEs.
This commit is contained in:
parent
6046d33a36
commit
21d55e77e6
@ -2423,13 +2423,15 @@ void TrackArtist::DrawNoteTrack(NoteTrack *track,
|
||||
Alg_seq_ptr seq = track->mSeq;
|
||||
if (!seq) {
|
||||
assert(track->mSerializationBuffer);
|
||||
// FIX-ME: This is in a clause where we *know* seq is NULL, so why are you dereferencing it?!!! I'm commenting out the rest of this clause.
|
||||
//Alg_track_ptr alg_track = seq->unserialize(track->mSerializationBuffer,
|
||||
// track->mSerializationLength);
|
||||
//assert(alg_track->get_type() == 's');
|
||||
//track->mSeq = seq = (Alg_seq_ptr) alg_track;
|
||||
//free(track->mSerializationBuffer);
|
||||
//track->mSerializationBuffer = NULL;
|
||||
// JKC: Previously this indirected via seq->, a NULL pointer.
|
||||
// This was actually OK, since unserialize is a static function.
|
||||
// Alg_seq:: is clearer.
|
||||
Alg_track_ptr alg_track = Alg_seq::unserialize(track->mSerializationBuffer,
|
||||
track->mSerializationLength);
|
||||
assert(alg_track->get_type() == 's');
|
||||
track->mSeq = seq = (Alg_seq_ptr) alg_track;
|
||||
free(track->mSerializationBuffer);
|
||||
track->mSerializationBuffer = NULL;
|
||||
}
|
||||
assert(seq);
|
||||
int visibleChannels = track->mVisibleChannels;
|
||||
|
@ -4517,16 +4517,8 @@ void TrackPanel::HandleResizeDrag(wxMouseEvent & event)
|
||||
if (link) {
|
||||
link->SetHeight(link->GetHeight());
|
||||
link->SetMinimized(false);
|
||||
}
|
||||
|
||||
// Initial values must be reset since they weren't based on the
|
||||
// minimized heights.
|
||||
if (mCapturedTrack->GetLinked()) {
|
||||
mInitialUpperTrackHeight = mCapturedTrack->GetHeight();
|
||||
if (link) // FIX-ME: This wasn't checked previously. Is mInitialTrackHeight safe if this doesn't fire?
|
||||
mInitialTrackHeight = link->GetHeight();
|
||||
}
|
||||
else if (link) {
|
||||
// Initial values must be reset since they weren't based on the
|
||||
// minimized heights.
|
||||
mInitialUpperTrackHeight = link->GetHeight();
|
||||
mInitialTrackHeight = mCapturedTrack->GetHeight();
|
||||
}
|
||||
@ -5900,14 +5892,13 @@ void TrackPanel::OnPrevTrack( bool shift )
|
||||
p = mTracks->GetPrev( t, true ); // Get previous track
|
||||
if( p == NULL ) // On first track
|
||||
{
|
||||
wxBell(); // ANSWER-ME: Why?
|
||||
// JKC: wxBell() is probably for accessibility, so a blind
|
||||
// user knows they were at the top track.
|
||||
wxBell();
|
||||
if( mCircularTrackNavigation )
|
||||
{
|
||||
TrackListIterator iter( mTracks );
|
||||
for( Track *d = iter.First(); d; d = iter.Next( true ) )
|
||||
{
|
||||
p = d; // ANSWER-ME: Is there supposed to be a stopping condition here? If seeking last, why not just use iter.Last()? And what does "d" stand for?!
|
||||
}
|
||||
p = iter.Last();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2137,6 +2137,7 @@ bool WaveTrack::Resample(int rate, ProgressDialog *progress)
|
||||
for (WaveClipList::compatibility_iterator it=GetClipIterator(); it; it=it->GetNext())
|
||||
if (!it->GetData()->Resample(rate, progress))
|
||||
{
|
||||
wxLogDebug( wxT("Resampling problem! We're partially resampled") );
|
||||
// FIX-ME: The track is now in an inconsistent state since some
|
||||
// clips are resampled and some are not
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user