mirror of
https://github.com/cookiengineer/audacity
synced 2026-04-01 03:54:47 +02:00
Avoid some unexpected recursions because of yields to event loop...
... See code comments. Not proved to be a cause of data loss bugs, but they caused surprises when trying to step in the debugger.
This commit is contained in:
@@ -910,16 +910,21 @@ void ProjectAudioManager::OnAudioIOStopRecording()
|
||||
|
||||
history.ModifyState( true ); // this might fail and throw
|
||||
|
||||
ShowWarningDialog(&window, wxT("DropoutDetected"), XO("\
|
||||
// CallAfter so that we avoid any problems of yielding
|
||||
// to the event loop while still inside the timer callback,
|
||||
// entering StopStream() recursively
|
||||
wxTheApp->CallAfter( [&] {
|
||||
ShowWarningDialog(&window, wxT("DropoutDetected"), XO("\
|
||||
Recorded audio was lost at the labeled locations. Possible causes:\n\
|
||||
\n\
|
||||
Other applications are competing with Audacity for processor time\n\
|
||||
\n\
|
||||
You are saving directly to a slow external storage device\n\
|
||||
"
|
||||
),
|
||||
false,
|
||||
XXO("Turn off dropout detection"));
|
||||
),
|
||||
false,
|
||||
XXO("Turn off dropout detection"));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user