Statistics - add sample count

This commit is contained in:
twinaphex 2018-03-24 15:42:45 +01:00
parent 33d99fe75b
commit 875450e228
3 changed files with 5 additions and 1 deletions

View File

@ -213,6 +213,8 @@ bool compute_audio_buffer_statistics(audio_statistics_t *stats)
if (!stats || samples < 3)
return false;
stats->samples = samples;
#ifdef WARPUP
/* uint64 to double not implemented, fair chance
* signed int64 to double doesn't exist either */

View File

@ -52,6 +52,7 @@ typedef struct audio_statistics
float std_deviation_percentage;
float close_to_underrun;
float close_to_blocking;
unsigned samples;
} audio_statistics_t;
typedef struct audio_driver

View File

@ -2543,7 +2543,7 @@ void video_driver_frame(const void *data, unsigned width,
sizeof(video_info.stat_text),
"Video Statistics:\n -Frame rate: %6.2f fps\n -Frame time: %6.2f ms\n -Frame time deviation: %.3f %%\n"
" -Frame count: %" PRIu64"\n -Viewport: %d x %d x %3.2f\n"
"Audio Statistics:\n -Average buffer saturation: %.2f %%\n -Standard deviation: %.2f %%\n -Time spent close to underrun: %.2f %%\n -Time spent close to blocking: %.2f %%\n"
"Audio Statistics:\n -Average buffer saturation: %.2f %%\n -Standard deviation: %.2f %%\n -Time spent close to underrun: %.2f %%\n -Time spent close to blocking: %.2f %%\n -Sample count: %d\n"
"Core Geometry:\n -Size: %u x %u\n -Max Size: %u x %u\n -Aspect: %3.2f\nCore Timing:\n -FPS: %3.2f\n -Sample Rate: %6.2f\n",
video_info.frame_rate,
video_info.frame_time,
@ -2556,6 +2556,7 @@ void video_driver_frame(const void *data, unsigned width,
audio_stats.std_deviation_percentage,
audio_stats.close_to_underrun,
audio_stats.close_to_blocking,
audio_stats.samples,
av_info->geometry.base_width,
av_info->geometry.base_height,
av_info->geometry.max_width,