generate pcm wav file: modular code inplement and test ok