def sec2samples(time_in_seconds, rate):
	""" turn time in seconds into time in samples"""
	time_in_samples = int(round(time_in_seconds * rate))

	if time_in_samples < 0:
		time_in_samples = 0
	return time_in_samples