Added code to multithread gunshot detect, and slightly fixed definitions of sampler code