public bool CaptureHasSamples(IntPtr handle) { int[] samples = new int[1] { 0 }; ALC10.alcGetIntegerv( handle, ALC11.ALC_CAPTURE_SAMPLES, 1, samples ); return(samples[0] > 0); }
public int CaptureSamples(IntPtr handle, IntPtr buffer, int count) { int[] samples = new int[1] { 0 }; ALC10.alcGetIntegerv( handle, ALC11.ALC_CAPTURE_SAMPLES, 1, samples ); samples[0] = Math.Min(samples[0], count / 2); if (samples[0] > 0) { ALC11.alcCaptureSamples(handle, buffer, samples[0]); } #if VERBOSE_AL_DEBUGGING if (CheckALCError()) { throw new InvalidOperationException("AL device error!"); } #endif return(samples[0] * 2); }