mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-26 09:28:07 +02:00
Fix bug 1367
This commit is contained in:
parent
b764c465d0
commit
127105618f
@ -447,8 +447,8 @@ int TimerRecordDialog::RunWaitDialog()
|
|||||||
|
|
||||||
// Loop for progress display during recording.
|
// Loop for progress display during recording.
|
||||||
while (bIsRecording && (updateResult == eProgressSuccess)) {
|
while (bIsRecording && (updateResult == eProgressSuccess)) {
|
||||||
wxMilliSleep(kTimerInterval);
|
|
||||||
updateResult = progress.Update();
|
updateResult = progress.Update();
|
||||||
|
wxMilliSleep(kTimerInterval);
|
||||||
bIsRecording = (wxDateTime::UNow() <= m_DateTime_End); // Call UNow() again for extra accuracy...
|
bIsRecording = (wxDateTime::UNow() <= m_DateTime_End); // Call UNow() again for extra accuracy...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -886,8 +886,8 @@ int TimerRecordDialog::WaitForStart()
|
|||||||
bool bIsRecording = false;
|
bool bIsRecording = false;
|
||||||
while (updateResult == eProgressSuccess && !bIsRecording)
|
while (updateResult == eProgressSuccess && !bIsRecording)
|
||||||
{
|
{
|
||||||
wxMilliSleep(10);
|
|
||||||
updateResult = progress.Update();
|
updateResult = progress.Update();
|
||||||
|
wxMilliSleep(10);
|
||||||
bIsRecording = (m_DateTime_Start <= wxDateTime::UNow());
|
bIsRecording = (m_DateTime_Start <= wxDateTime::UNow());
|
||||||
}
|
}
|
||||||
return updateResult;
|
return updateResult;
|
||||||
@ -929,8 +929,8 @@ int TimerRecordDialog::PreActionDelay(int iActionIndex, bool bSaved, bool bExpor
|
|||||||
bool bIsTime = false;
|
bool bIsTime = false;
|
||||||
while (iUpdateResult == eProgressSuccess && !bIsTime)
|
while (iUpdateResult == eProgressSuccess && !bIsTime)
|
||||||
{
|
{
|
||||||
wxMilliSleep(10);
|
|
||||||
iUpdateResult = dlgAction.Update();
|
iUpdateResult = dlgAction.Update();
|
||||||
|
wxMilliSleep(10);
|
||||||
bIsTime = (dtActionTime <= wxDateTime::UNow());
|
bIsTime = (dtActionTime <= wxDateTime::UNow());
|
||||||
}
|
}
|
||||||
return iUpdateResult;
|
return iUpdateResult;
|
||||||
|
@ -1569,7 +1569,14 @@ int TimerProgressDialog::Update(const wxString & message /*= wxEmptyString*/)
|
|||||||
// From testing, it's never shown bigger than 1009, but
|
// From testing, it's never shown bigger than 1009, but
|
||||||
// give it a little extra, to 1010.
|
// give it a little extra, to 1010.
|
||||||
// wxASSERT((nGaugeValue >= 0) && (nGaugeValue <= 1000)); // This ought to work.
|
// wxASSERT((nGaugeValue >= 0) && (nGaugeValue <= 1000)); // This ought to work.
|
||||||
wxASSERT((nGaugeValue >= 0) && (nGaugeValue <= 1010));
|
// wxASSERT((nGaugeValue >= 0) && (nGaugeValue <= 1010));
|
||||||
|
//
|
||||||
|
// stf. Update was being called after wxMilliSleep(<ms>), which could be up to <ms>
|
||||||
|
// beyond the completion time. My gusess is that the microsleep in RunWaitDialog was originally 10 ms
|
||||||
|
// (same as other uses of Update) but was updated to kTimerInterval = 50 ms, thus triggering
|
||||||
|
// the Assert (Bug 1367). By calling Update() before sleeping then I think nGaugeValue <= 1000 should work.
|
||||||
|
wxASSERT((nGaugeValue >= 0) && (nGaugeValue <= 1000));
|
||||||
|
|
||||||
if (nGaugeValue != mLastValue)
|
if (nGaugeValue != mLastValue)
|
||||||
{
|
{
|
||||||
mGauge->SetValue(nGaugeValue);
|
mGauge->SetValue(nGaugeValue);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user