Fixed crash on sample rate change.