Beispiel #1
0
 public void GetSamplesSync(out short[] samples, out int nsamp)
 {
     blip.EndFrame((uint)_tStatesPerFrame);
     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 #2
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);

            master_audio_clock = 0;
        }
Beispiel #3
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 #4
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 #5
0
        public void GetSamplesSync(out short[] samples, out int nsamp)
        {
            _blip_C.EndFrame(master_audio_clock);

            nsamp = _blip_C.SamplesAvailable();

            samples = new short[nsamp * 2];

            if (nsamp != 0)
            {
                _blip_C.ReadSamples(samples, nsamp, false);
            }

            master_audio_clock = 0;
        }
        public void GetSamplesSync(out short[] samples, out int nsamp)
        {
            uint f_clock = LibMSX.MSX_get_audio(MSX_Pntr, Aud, ref num_samp);

            for (int i = 0; i < num_samp; i++)
            {
                blip.AddDelta((uint)Aud[i * 2], Aud[i * 2 + 1]);
            }

            blip.EndFrame(f_clock);

            nsamp   = blip.SamplesAvailable();
            samples = new short[nsamp * 2];

            blip.ReadSamples(samples, nsamp, true);
        }
Beispiel #7
0
        public void GetSamplesSync(out short[] samples, out int nsamp)
        {
            blip.EndFrame(apu.sampleclock);
            apu.sampleclock = 0;

            nsamp   = blip.SamplesAvailable();
            samples = new short[nsamp * 2];

            blip.ReadSamples(samples, nsamp, true);
            // duplicate to stereo
            for (int i = 0; i < nsamp * 2; i += 2)
            {
                samples[i + 1] = samples[i];
            }

            Board.ApplyCustomAudio(samples);
        }
Beispiel #8
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 #9
0
            public void GetSamplesSync(out short[] samples, out int nsamp)
            {
                //Console.WriteLine("ASync: {0}", nes.apu.dlist.Count);
                foreach (var d in nes.apu.dlist)
                {
                    blip.AddDelta(d.time, d.value);
                }
                nes.apu.dlist.Clear();
                blip.EndFrame(nes.apu.sampleclock);
                nes.apu.sampleclock = 0;

                nsamp   = blip.SamplesAvailable();
                samples = new short[nsamp * 2];

                blip.ReadSamples(samples, nsamp, true);
                // duplicate to stereo
                for (int i = 0; i < nsamp * 2; i += 2)
                {
                    samples[i + 1] = samples[i];
                }

                nes.Board.ApplyCustomAudio(samples);
            }