New FrameTime/VBlank Analyzer + Graph

This commit is contained in:
Sam Belliveau
2022-12-23 19:52:53 -05:00
parent 2345ba178d
commit 673f81c18a
26 changed files with 721 additions and 240 deletions

View File

@ -14,6 +14,7 @@
#include "Common/Swap.h"
#include "Core/Config/MainSettings.h"
#include "Core/ConfigManager.h"
#include "VideoCommon/PerformanceMetrics.h"
static u32 DPL2QualityToFrameBlockSize(AudioCommon::DPL2Quality quality)
{
@ -160,6 +161,8 @@ unsigned int Mixer::Mix(short* samples, unsigned int num_samples)
memset(samples, 0, num_samples * 2 * sizeof(short));
// TODO: Determine how emulation speed will be used in audio
// const float emulation_speed = std::roundf(g_perf_metrics.GetSpeed()) / 100.f;
const float emulation_speed = m_config_emulation_speed;
const int timing_variance = m_config_timing_variance;
if (m_config_audio_stretch)

View File

@ -48,9 +48,6 @@ public:
void StartLogDSPAudio(const std::string& filename);
void StopLogDSPAudio();
float GetCurrentSpeed() const { return m_speed.load(); }
void UpdateSpeed(float val) { m_speed.store(val); }
// 54000000 doesn't work here as it doesn't evenly divide with 32000, but 108000000 does
static constexpr u64 FIXED_SAMPLE_RATE_DIVIDEND = 54000000 * 2;
@ -117,9 +114,6 @@ private:
bool m_log_dtk_audio = false;
bool m_log_dsp_audio = false;
// Current rate of emulation (1.0 = 100% speed)
std::atomic<float> m_speed{0.0f};
float m_config_emulation_speed;
int m_config_timing_variance;
bool m_config_audio_stretch;