public static Time FromSeconds(int sampleRate, float seconds) { return(new Time(sampleRate, Converters.SecondsToSamples(sampleRate, seconds))); }
public static Time FromMilliseconds(int sampleRate, float milliseconds) { return(new Time(sampleRate, Converters.MillisecondsToSamples(sampleRate, milliseconds))); }
private Time(int sampleRate, int samples) { Samples = samples; Seconds = Converters.SamplesToSeconds(sampleRate, Samples); Milliseconds = Converters.SamplesToMilliseconds(sampleRate, samples); }