Example #1
0
        public void GetSamplesSync(out short[] samples, out int nsamp)
        {
            if (SyncMode != SyncSoundMode.Sync)
            {
                throw new InvalidOperationException("Must be in sync mode to call a sync method");
            }

            short[] ret = new short[spf * 2];
            source.GetSamples(ret);
            samples = ret;
            nsamp   = spf;
        }
Example #2
0
 public void PullSamples(IAsyncSoundProvider source)
 {
     Array.Clear(pullBuffer, 0, 1470);
     source.GetSamples(pullBuffer);
     Buffer.EnqueueSamples(pullBuffer, 735);
 }