to convert sound buffer to proper type as late as possible