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

Fix other cause of intermittent timing-dependent crash at shutdown...

... AudioIO holds a weak pointer to its listener so there is no dangling
pointer
This commit is contained in:
Paul Licameli
2019-06-24 13:32:08 -04:00
parent b8838b38ed
commit e08a942ab8
6 changed files with 48 additions and 34 deletions

View File

@@ -74,7 +74,6 @@ struct AudioIOStartStreamOptions
AudioIOStartStreamOptions(AudacityProject *pProject_, double rate_)
: pProject{ pProject_ }
, envelope(nullptr)
, listener(NULL)
, rate(rate_)
, playLooped(false)
, cutPreviewGapStart(0.0)
@@ -86,7 +85,7 @@ struct AudioIOStartStreamOptions
AudacityProject *pProject{};
MeterPanelBase *captureMeter{}, *playbackMeter{};
BoundedEnvelope *envelope; // for time warping
AudioIOListener* listener;
std::shared_ptr< AudioIOListener > listener;
double rate;
bool playLooped;
double cutPreviewGapStart;