Added BufferCallBack function for playback