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