simple record and play sound func in linux