mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
(audio_driver.c) Get rid of performance counters
This commit is contained in:
parent
a88284897b
commit
d61edc51ad
@ -41,7 +41,6 @@
|
||||
#include "../configuration.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../performance_counters.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../list_special.h"
|
||||
|
||||
@ -506,8 +505,6 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
bool is_paused = false;
|
||||
bool is_idle = false;
|
||||
bool is_slowmotion = false;
|
||||
static struct retro_perf_counter resampler_proc = {0};
|
||||
static struct retro_perf_counter audio_convert_s16 = {0};
|
||||
const void *output_data = NULL;
|
||||
unsigned output_frames = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -529,11 +526,8 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
if (!audio_driver_active || !audio_driver_input_data)
|
||||
return false;
|
||||
|
||||
performance_counter_init(audio_convert_s16, "audio_convert_s16");
|
||||
performance_counter_start_plus(is_perfcnt_enable, audio_convert_s16);
|
||||
convert_s16_to_float(audio_driver_input_data, data, samples,
|
||||
audio_driver_volume_gain);
|
||||
performance_counter_stop_plus(is_perfcnt_enable, audio_convert_s16);
|
||||
|
||||
src_data.data_in = audio_driver_input_data;
|
||||
src_data.input_frames = samples >> 1;
|
||||
@ -541,7 +535,6 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
|
||||
if (audio_driver_dsp)
|
||||
{
|
||||
static struct retro_perf_counter audio_dsp = {0};
|
||||
struct retro_dsp_data dsp_data;
|
||||
|
||||
dsp_data.input = NULL;
|
||||
@ -552,10 +545,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
dsp_data.input = audio_driver_input_data;
|
||||
dsp_data.input_frames = (unsigned)(samples >> 1);
|
||||
|
||||
performance_counter_init(audio_dsp, "audio_dsp");
|
||||
performance_counter_start_plus(is_perfcnt_enable, audio_dsp);
|
||||
retro_dsp_filter_process(audio_driver_dsp, &dsp_data);
|
||||
performance_counter_stop_plus(is_perfcnt_enable, audio_dsp);
|
||||
|
||||
if (dsp_data.output)
|
||||
{
|
||||
@ -599,11 +589,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
if (is_slowmotion)
|
||||
src_data.ratio *= settings->slowmotion_ratio;
|
||||
|
||||
performance_counter_init(resampler_proc, "resampler_proc");
|
||||
performance_counter_start_plus(is_perfcnt_enable, resampler_proc);
|
||||
|
||||
audio_driver_resampler->process(audio_driver_resampler_data, &src_data);
|
||||
performance_counter_stop_plus(is_perfcnt_enable, resampler_proc);
|
||||
|
||||
output_data = audio_driver_output_samples_buf;
|
||||
output_frames = (unsigned)src_data.output_frames;
|
||||
@ -612,13 +598,8 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
output_frames *= sizeof(float);
|
||||
else
|
||||
{
|
||||
static struct retro_perf_counter audio_convert_float = {0};
|
||||
|
||||
performance_counter_init(audio_convert_float, "audio_convert_float");
|
||||
performance_counter_start_plus(is_perfcnt_enable, audio_convert_float);
|
||||
convert_float_to_s16(audio_driver_output_samples_conv_buf,
|
||||
(const float*)output_data, output_frames * 2);
|
||||
performance_counter_stop_plus(is_perfcnt_enable, audio_convert_float);
|
||||
|
||||
output_data = audio_driver_output_samples_conv_buf;
|
||||
output_frames *= sizeof(int16_t);
|
||||
|
Loading…
Reference in New Issue
Block a user