Fixed the segfault that occurred when the doppler rate parameter was changed during runtime. Use mutex for locking and unlocking.