1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

AudioIO does not depend directly on ControlToolBar ...

... use one more callback in the listener to change the ControlToolBar pause
state.
This commit is contained in:
Paul Licameli
2019-06-24 11:11:45 -04:00
parent bcc90ee91a
commit d9b780b067
4 changed files with 17 additions and 3 deletions

View File

@@ -462,7 +462,6 @@ time warp info and AudioIOListener and whether the playback is looped.
#include "effects/RealtimeEffectManager.h"
#include "prefs/QualityPrefs.h"
#include "prefs/RecordingPrefs.h"
#include "toolbars/ControlToolBar.h"
#include "widgets/MeterPanelBase.h"
#include "widgets/AudacityMessageBox.h"
#include "widgets/ErrorDialog.h"
@@ -3692,8 +3691,8 @@ void AudioIoCallback::CheckSoundActivatedRecordingLevel( const void *inputBuffer
bool bShouldBePaused = mInputMeter->GetMaxPeak() < mSilenceLevel;
if( bShouldBePaused != IsPaused())
{
auto &bar = ControlToolBar::Get( *mOwningProject );
bar.CallAfter(&ControlToolBar::Pause);
if ( mListener )
mListener->OnSoundActivationThreshold();
}
}