Sample code for record and play sound. It's noisy in cygwin :(. Maybe it will work better in linux.