public SoundRecordingViewModel(IGameBoy gameboy)
        {
            _gameboy = gameboy;
            _apu     = gameboy.APU;

            _gameboy.StopRequested += _gameboy_StopRequested;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CircularWriteableBufferingSource"/> class.
 /// </summary>
 /// <param name="waveFormat">The WaveFormat of the source.</param>
 /// <param name="bufferSize">Buffersize in bytes.</param>
 public DirectStreamingSource(WaveFormat waveFormat, IAPU apu)
 {
     if (waveFormat == null) { throw new ArgumentNullException("waveFormat"); }
       _waveFormat = waveFormat;
       _streamingSource = apu;
       MaxBufferSize = 88000;
 }
        public SoundRecordingViewModel(IGameBoy gameboy)
        {
            _gameboy = gameboy;
              _apu = gameboy.APU;

              _gameboy.StopRequested += _gameboy_StopRequested;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CircularWriteableBufferingSource"/> class.
 /// </summary>
 /// <param name="waveFormat">The WaveFormat of the source.</param>
 /// <param name="bufferSize">Buffersize in bytes.</param>
 public DirectStreamingSource(WaveFormat waveFormat, IAPU apu)
 {
     if (waveFormat == null)
     {
         throw new ArgumentNullException("waveFormat");
     }
     _waveFormat      = waveFormat;
     _streamingSource = apu;
     MaxBufferSize    = 88000;
 }
Ejemplo n.º 5
0
 private void ReloadAPU()
 {
     _apu        = _gameboy.APU;
     _waveFormat = new WaveFormat(_apu.SampleRate,
                                  _apu.SampleSize * 8,
                                  _apu.NumChannels);
     _source   = new DirectStreamingSource(_waveFormat, _apu);
     _soundOut = GetSoundOut();
     _soundOut.Initialize(_source);
     _soundOut.Volume = 0.2f;
 }
Ejemplo n.º 6
0
 public SNESSystem(ICPU cpu, IRenderer renderer, IROM rom, IPPU ppu, IAPU apu, IAudioHandler audioHandler)
 {
     CPU          = cpu;
     Renderer     = renderer;
     AudioHandler = audioHandler;
     ROM          = rom;
     rom?.SetSystem(this);
     PPU = ppu;
     PPU?.SetSystem(this);
     APU = apu;
     CPU?.SetSystem(this);
 }
Ejemplo n.º 7
0
 private void ReloadAPU()
 {
     _apu = _gameboy.APU;
       _waveFormat = new WaveFormat(_apu.SampleRate,
                            _apu.SampleSize * 8,
                            _apu.NumChannels);
       _source = new DirectStreamingSource(_waveFormat, _apu);
       _soundOut = GetSoundOut();
       _soundOut.Initialize(_source);
       _soundOut.Volume = 0.2f;
 }
Ejemplo n.º 8
0
 public void SetAPU(IAPU apu)
 {
     _apu = apu;
 }