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; }
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; }
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); }
public void SetAPU(IAPU apu) { _apu = apu; }