Change buffer size implementation to buffer time in seconds.