def time2sample(time: float, sample_rate: int) -> int:
    """converts time to number of sample

    Args:
        time (float): time in seconds to be converted into samples
        sample_rate (int): sample rate to use

    Returns:
        int: sample
    """
    return round(time * sample_rate)