mirror of
https://github.com/libretro/RetroArch
synced 2025-03-13 07:14:43 +00:00
Performance counters for audio
This commit is contained in:
parent
a01c5dec69
commit
1902763f67
@ -1,6 +1,6 @@
|
||||
RARCH_VERSION = "0.9.7"
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
PERF_TEST := 0
|
||||
PERF_TEST := 1
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
|
@ -364,7 +364,10 @@ static bool audio_flush(const int16_t *data, size_t samples)
|
||||
unsigned output_frames = 0;
|
||||
|
||||
struct resampler_data src_data = {0};
|
||||
RARCH_PERFORMANCE_INIT(audio_convert_s16);
|
||||
RARCH_PERFORMANCE_START(audio_convert_s16);
|
||||
audio_convert_s16_to_float(g_extern.audio_data.data, data, samples);
|
||||
RARCH_PERFORMANCE_STOP(audio_convert_s16);
|
||||
|
||||
#if defined(HAVE_DYLIB)
|
||||
rarch_dsp_output_t dsp_output = {0};
|
||||
@ -391,7 +394,10 @@ static bool audio_flush(const int16_t *data, size_t samples)
|
||||
if (g_extern.is_slowmotion)
|
||||
src_data.ratio *= g_settings.slowmotion_ratio;
|
||||
|
||||
RARCH_PERFORMANCE_INIT(resampler_proc);
|
||||
RARCH_PERFORMANCE_START(resampler_proc);
|
||||
resampler_process(g_extern.audio_data.source, &src_data);
|
||||
RARCH_PERFORMANCE_STOP(resampler_proc);
|
||||
|
||||
output_data = g_extern.audio_data.outsamples;
|
||||
output_frames = src_data.output_frames;
|
||||
@ -406,8 +412,11 @@ static bool audio_flush(const int16_t *data, size_t samples)
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_PERFORMANCE_INIT(audio_convert_float);
|
||||
RARCH_PERFORMANCE_START(audio_convert_float);
|
||||
audio_convert_float_to_s16(g_extern.audio_data.conv_outsamples,
|
||||
output_data, output_frames * 2);
|
||||
RARCH_PERFORMANCE_STOP(audio_convert_float);
|
||||
|
||||
if (audio_write_func(g_extern.audio_data.conv_outsamples, output_frames * sizeof(int16_t) * 2) < 0)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user