fixed lock management in recording logic that randomly caused crash

Tglman requested to merge tglman/Shortwave:master into master

The lock where acquired and released in each call, causing not clear behaviour and relative crashes, now should be more stable on this set of crashes, even though i did reproduce other crashes

Merge request reports