Added recording functionality with playback. Stores the data in wave
format.