Made buffer in dspThread a pointer and used malloc