add exportPCM function for #236