コード例 #1
0
 public int Read(float[] buffer, int offset, int count)
 {
     for (int i = offset; i < offset + count; ++i)
     {
         buffer[i] = 0;
     }
     if (!source.IsReady(position, count))
     {
         throw new Exception("All sources must be ready when exporting.");
     }
     else
     {
         int pos = source.Mix(position, buffer, offset, count);
         int n   = Math.Max(0, pos - position);
         position = pos;
         return(n);
     }
 }
コード例 #2
0
 public int Read(float[] buffer, int offset, int count)
 {
     for (int i = offset; i < offset + count; ++i)
     {
         buffer[i] = 0;
     }
     if (!source.IsReady(position, count))
     {
         Paused += count;
         return(count);
     }
     else
     {
         int pos = source.Mix(position, buffer, offset, count);
         int n   = Math.Max(0, pos - position);
         position = pos;
         return(n);
     }
 }