Beispiel #1
0
 public int ReadSamplesLeft(short[] output, int count)
 {
     if (output.Length < count * 2)
     {
         throw new ArgumentOutOfRangeException();
     }
     return(BlipBufDll.blip_read_samples(context, output, count, 1));
 }
Beispiel #2
0
 public int ReadSamples(short[] output, int count, bool stereo)
 {
     if (output.Length < count * (stereo ? 2 : 1))
     {
         throw new ArgumentOutOfRangeException();
     }
     return(BlipBufDll.blip_read_samples(context, output, count, stereo ? 1 : 0));
 }
Beispiel #3
0
 public int ReadSamplesRight(short[] output, int count)
 {
     if (output.Length < count * 2)
     {
         throw new ArgumentOutOfRangeException();
     }
     unsafe
     {
         fixed(short *s = &output[1])
         return(BlipBufDll.blip_read_samples(context, new IntPtr(s), count, 1));
     }
 }