Sample code to record and play sound. I test it in cygwin, but it's noisy :(. Maybe It will work better in linux.