-
Notifications
You must be signed in to change notification settings - Fork 337
NBFM audio samples trapped in buffer after squelch closes #2383
Description
sdrtrunk Version
Master branch
Describe the bug
After a NBFM transmission completes and the squelch engages, audio samples are left in the output buffer of RealResampler. The number of samples remaining is between 1 and 511, because the BufferManager only broadcasts audio in 512 sample blocks. The samples remain in the output buffer until the next NBFM transmission, where new incoming audio is added to the buffer to bring it over the 512 threshold.
This has the effect of prepending the leftover audio from the earlier call onto the beginning of the new call.
To Reproduce
I was able to verify this by injecting some audio "markers" into the un-resampled audio stream at the beginning and end of squelch closings and could clearly see in the .wav file the end of the previous transmission at the beginning of the next.
I am currently testing a fix and will issue a PR when completed.