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

Switch to calling Yield via wxTheApp instead of wxGetApp(). Simpler to use pointer, AudacityApp doesn't override Yield, and this fixes compile error on VC++ Unicode Release.

This commit is contained in:
v.audacity 2010-07-24 23:21:51 +00:00
parent 4ae0fa3238
commit 8c51e56248
5 changed files with 9 additions and 9 deletions

View File

@ -66,7 +66,7 @@ void NonGuiThread::RunInThread(tGenericFn pFn)
{ {
wxMilliSleep( 100 ); wxMilliSleep( 100 );
//traits->AlwaysYield(); //traits->AlwaysYield();
wxGetApp().Yield(); wxTheApp->Yield();
} }
#ifdef WXMSW #ifdef WXMSW
traits->AfterChildWaitLoop(cookie); traits->AfterChildWaitLoop(cookie);

View File

@ -377,7 +377,7 @@ AudioIO::~AudioIO()
/* Delete is a "graceful" way to stop the thread. /* Delete is a "graceful" way to stop the thread.
(Kill is the not-graceful way.) */ (Kill is the not-graceful way.) */
wxGetApp().Yield(); wxTheApp->Yield();
mThread->Delete(); mThread->Delete();
if(mSilentBuf) if(mSilentBuf)

View File

@ -367,7 +367,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event )
Printf(wxT("Preparing...\n")); Printf(wxT("Preparing...\n"));
wxGetApp().Yield(); wxTheApp->Yield();
FlushPrint(); FlushPrint();
int i, b, v; int i, b, v;
@ -400,7 +400,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event )
//t->Debug(); //t->Debug();
Printf(wxT("Performing %d edits...\n"), trials); Printf(wxT("Performing %d edits...\n"), trials);
wxGetApp().Yield(); wxTheApp->Yield();
FlushPrint(); FlushPrint();
timer.Start(); timer.Start();
@ -454,7 +454,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event )
} }
Printf(wxT("Time to perform %d edits: %ld ms\n"), trials, elapsed); Printf(wxT("Time to perform %d edits: %ld ms\n"), trials, elapsed);
FlushPrint(); FlushPrint();
wxGetApp().Yield(); wxTheApp->Yield();
#if 0 #if 0
@ -466,7 +466,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event )
Printf(wxT("Doing correctness check...\n")); Printf(wxT("Doing correctness check...\n"));
FlushPrint(); FlushPrint();
wxGetApp().Yield(); wxTheApp->Yield();
bad = 0; bad = 0;
timer.Start(); timer.Start();
@ -491,7 +491,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event )
Printf(wxT("Time to check all data: %ld ms\n"), elapsed); Printf(wxT("Time to check all data: %ld ms\n"), elapsed);
Printf(wxT("Reading data again...\n")); Printf(wxT("Reading data again...\n"));
wxGetApp().Yield(); wxTheApp->Yield();
FlushPrint(); FlushPrint();
timer.Start(); timer.Start();

View File

@ -68,7 +68,7 @@ static void main_do_event(GdkEvent *event, wxArrayPtrVoid *queue)
CaptureEvents::CaptureEvents() CaptureEvents::CaptureEvents()
{ {
#if wxUSE_LOG #if wxUSE_LOG
// disable log flushing from here because a call to wxGetApp().Yield() shouldn't // disable log flushing from here because a call to wxTheApp->Yield() shouldn't
// normally result in message boxes popping up &c // normally result in message boxes popping up &c
wxLog::Suspend(); wxLog::Suspend();
#endif #endif

View File

@ -413,7 +413,7 @@ int ExportCL::Export(AudacityProject *project,
// Wait for process to terminate // Wait for process to terminate
while (p->IsActive()) { while (p->IsActive()) {
wxMilliSleep(10); wxMilliSleep(10);
wxGetApp().Yield(); wxTheApp->Yield();
} }
// Display output on error or if the user wants to see it // Display output on error or if the user wants to see it