Beispiel #1
0
        public void GetSamplesSync(out short[] samples, out int nsamp)
        {
            blip_L.EndFrame(sampleclock);
            blip_R.EndFrame(sampleclock);

            nsamp   = Math.Max(Math.Max(blip_L.SamplesAvailable(), blip_R.SamplesAvailable()), 1);
            samples = new short[nsamp * 2];

            blip_L.ReadSamplesLeft(samples, nsamp);
            blip_R.ReadSamplesRight(samples, nsamp);

            sampleclock = 0;
        }
Beispiel #2
0
        public void GetSamplesSync(out short[] samples, out int nsamp)
        {
            _blip.EndFrame((uint)_clocksPerFrame);
            nsamp   = _blip.SamplesAvailable();
            samples = new short[nsamp * 2];
            _blip.ReadSamples(samples, nsamp, true);
            for (int i = 0; i < nsamp * 2; i += 2)
            {
                samples[i + 1] = samples[i];
            }

            clockCounter = 0;
        }
Beispiel #3
0
        public void GetSamplesSync(out short[] samples, out int nsamp)
        {
            AudioChange();

            _blip.EndFrame((uint)ClockPerFrame);
            nsamp   = _blip.SamplesAvailable();
            samples = new short[nsamp * 2];
            _blip.ReadSamples(samples, nsamp, true);

            for (int i = 0; i < nsamp * 2; i += 2)
            {
                samples[i + 1] = samples[i];
            }
        }
Beispiel #4
0
        public void GetSamplesSync(out short[] samples, out int nsamp)
        {
            _blip.EndFrame(master_audio_clock);

            nsamp = _blip.SamplesAvailable();

            samples = new short[nsamp * 2];

            _blip.ReadSamples(samples, nsamp, true);

            for (int i = 0; i < nsamp * 2; i += 2)
            {
                samples[i + 1] = samples[i];
            }

            master_audio_clock = 0;
        }
Beispiel #5
0
        public void GetSamplesSync(out short[] samples, out int nsamp)
        {
            _blip_L.EndFrame(master_audio_clock);
            _blip_R.EndFrame(master_audio_clock);

            nsamp = _blip_L.SamplesAvailable();

            samples = new short[nsamp * 2];

            if (nsamp != 0)
            {
                _blip_L.ReadSamplesLeft(samples, nsamp);
                _blip_R.ReadSamplesRight(samples, nsamp);
            }

            master_audio_clock = 0;
        }
        public void GetSamplesSync(out short[] samples, out int nsamp)
        {
            if (!disablePSG)
            {
                blip_L.EndFrame(sampleclock);
                blip_R.EndFrame(sampleclock);

                nsamp   = Math.Max(Math.Max(blip_L.SamplesAvailable(), blip_R.SamplesAvailable()), 1);
                samples = new short[nsamp * 2];

                blip_L.ReadSamplesLeft(samples, nsamp);
                blip_R.ReadSamplesRight(samples, nsamp);

                ApplyYMAudio(samples);
            }
            else
            {
                nsamp   = 735;
                samples = new short[nsamp * 2];
                ApplyYMAudio(samples);
            }

            sampleclock = 0;
        }