From b6e9577aaed919975f32ee1a5a9821668089f2db Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 7 Aug 2018 11:29:47 +0200 Subject: Keep RC-modified settings across modulator restarts --- src/OfdmGenerator.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/OfdmGenerator.cpp') diff --git a/src/OfdmGenerator.cpp b/src/OfdmGenerator.cpp index 9a824ec..d9c3608 100644 --- a/src/OfdmGenerator.cpp +++ b/src/OfdmGenerator.cpp @@ -40,9 +40,9 @@ static const size_t MAX_CLIP_STATS = 10; OfdmGenerator::OfdmGenerator(size_t nbSymbols, size_t nbCarriers, size_t spacing, - bool enableCfr, - float cfrClip, - float cfrErrorClip, + bool& enableCfr, + float& cfrClip, + float& cfrErrorClip, bool inverse) : ModCodec(), RemoteControllable("ofdm"), myFftPlan(nullptr), @@ -197,10 +197,9 @@ int OfdmGenerator::process(Buffer* const dataIn, Buffer* dataOut) // The PAPRStats' clear() is not threadsafe, do not access it // from the RC functions. - if (myPaprClearRequest.load()) { + if (myPaprClearRequest.exchange(false)) { myPaprBeforeCFR.clear(); myPaprAfterCFR.clear(); - myPaprClearRequest.store(false); } for (size_t i = 0; i < myNbSymbols; ++i) { -- cgit v1.2.3