Bug:382 Resetting control toolbar whilst audio was playing led to attempts by gAudio to update a non-existent window and crash on OSX. We now stop the current monitoring on a toolbar reset.
This commit is contained in:
parent
352cca2c59
commit
6cc4b04784
|
@ -281,7 +281,10 @@ ScreenFrame::ScreenFrame(wxWindow * parent, wxWindowID id)
|
|||
|
||||
Populate();
|
||||
|
||||
// Reset the toolbars to a known state
|
||||
// Reset the toolbars to a known state.
|
||||
// Note that the audio could be playing.
|
||||
// The monitoring will switch off temporarily
|
||||
// because we've switched monitor mid play.
|
||||
mContext.proj->mToolManager->Reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -466,6 +466,10 @@ void ToolManager::Reset()
|
|||
{
|
||||
int ndx;
|
||||
|
||||
// The mInputMeter and mOutputMeter may be in use if audio is playing
|
||||
// when this happens.
|
||||
gAudioIO->SetMeters( NULL, NULL );
|
||||
|
||||
// Disconnect all docked bars
|
||||
for( ndx = 0; ndx < ToolBarCount; ndx++ )
|
||||
{
|
||||
|
@ -513,7 +517,11 @@ void ToolManager::Reset()
|
|||
parent->Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO:??
|
||||
// If audio was playing, we stopped the VU meters,
|
||||
// It would be nice to show them again, but hardly essential as
|
||||
// they will show up again on the next play.
|
||||
// SetVUMeters(AudacityProject *p);
|
||||
LayoutToolBars();
|
||||
Updated();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue