1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-17 00:57:40 +02:00

Bug 258 (P2)- Mixer Board: max peak and clipping lines removed

Moved updates for Mixer Board meters back to TrackPanel::OnTimer() to see if it helps Mac performance issues reported by Bill (http://bugzilla.audacityteam.org/show_bug.cgi?id=258#c9).
This commit is contained in:
v.audacity 2011-02-26 01:50:49 +00:00
parent 60cd572650
commit 20f37df3ec
3 changed files with 21 additions and 13 deletions

View File

@ -3647,11 +3647,15 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
gAudioIO->mOutputMeter->UpdateDisplay(numPlaybackChannels,
framesPerBuffer,
outputMeterFloats);
AudacityProject* pProj = GetActiveProject();
MixerBoard* pMixerBoard = pProj->GetMixerBoard();
if (pMixerBoard)
pMixerBoard->UpdateMeters(gAudioIO->GetStreamTime(),
(pProj->mLastPlayMode == loopedPlay));
//vvv Vaughan, 2011-02-25: Move this update back to
// TrackPanel::OnTimer() to see if it helps with
// playback issues reported by Bill and noted on Bug 258.
//AudacityProject* pProj = GetActiveProject();
//MixerBoard* pMixerBoard = pProj->GetMixerBoard();
//if (pMixerBoard)
// pMixerBoard->UpdateMeters(gAudioIO->GetStreamTime(),
// (pProj->mLastPlayMode == loopedPlay));
}
gAudioIO->mUpdatingMeters = false;
} // end playback VU meter update

View File

@ -419,6 +419,9 @@ void MixerTrackCluster::UpdateMeter(const double t0, const double t1)
if ((t0 < 0.0) || (t1 < 0.0) || (t0 >= t1) || // bad time value or nothing to show
((mMixerBoard->HasSolo() || mLeftTrack->GetMute()) && !mLeftTrack->GetSolo()))
{
//vvv Vaughan, 2011-02-25: Moved this update back to
// TrackPanel::OnTimer() to see if it helps with
// playback issues reported by Bill and noted on Bug 258.
// Vaughan, 2011-02-04: Now that we're updating all meters from audacityAudioCallback,
// this causes an assert if you click Mute while playing, because ResetMeter() resets
// the timer, and wxTimerbase says that can only be done from main thread --

View File

@ -883,17 +883,18 @@ void TrackPanel::OnTimer()
}
}
//vvv Vaughan, 2011-02-25: Move this update back here from audacityAudioCallback.
// Vaughan, 2010-01-30:
// Since all we're doing here is updating the meters, I moved it to
// audacityAudioCallback where it calls gAudioIO->mOutputMeter->UpdateDisplay().
//MixerBoard* pMixerBoard = this->GetMixerBoard();
//if (pMixerBoard &&
// (p->GetAudioIOToken() > 0) &&
// gAudioIO->IsStreamActive(p->GetAudioIOToken()))
//{
// pMixerBoard->UpdateMeters(gAudioIO->GetStreamTime(),
// (p->mLastPlayMode == loopedPlay));
//}
MixerBoard* pMixerBoard = this->GetMixerBoard();
if (pMixerBoard &&
(p->GetAudioIOToken() > 0) &&
gAudioIO->IsStreamActive(p->GetAudioIOToken()))
{
pMixerBoard->UpdateMeters(gAudioIO->GetStreamTime(),
(p->mLastPlayMode == loopedPlay));
}
// Check whether we were playing or recording, but the stream has stopped.
if (p->GetAudioIOToken()>0 &&