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