Added entire buffer processing instead of single sample