/// <summary> /// Allow the device to react to the completion of a frame /// </summary> public void OnFrameCompleted() { if (LastSampleTact < _frameBegins + _frameTacts) { // --- Expand the samples till the end of the frame CreateSamples(_frameBegins + _frameTacts); } if (HostVm.Cpu.Tacts > _frameBegins + _frameTacts) { // --- Sign overflow tacts Overflow = (int)(HostVm.Cpu.Tacts - _frameBegins - _frameTacts); } _soundProvider?.AddSoundFrame(AudioSamples); _frameBegins += _frameTacts; }