Rename rarch_dsp_* to retro_dsp_*

This commit is contained in:
twinaphex 2017-01-09 12:41:59 +01:00
parent 14a800f1f5
commit 03adb6fd3a
3 changed files with 32 additions and 32 deletions

View File

@ -139,7 +139,7 @@ static double audio_source_ratio_original = 0.0f;
static double audio_source_ratio_current = 0.0f;
static struct retro_audio_callback audio_callback = {0};
static rarch_dsp_filter_t *audio_driver_dsp = NULL;
static retro_dsp_filter_t *audio_driver_dsp = NULL;
static struct string_list *audio_driver_devices_list = NULL;
static const rarch_resampler_t *audio_driver_resampler = NULL;
static void *audio_driver_resampler_data = NULL;
@ -535,7 +535,7 @@ 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 rarch_dsp_data dsp_data;
struct retro_dsp_data dsp_data;
dsp_data.input = NULL;
dsp_data.input_frames = 0;
@ -547,7 +547,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
performance_counter_init(&audio_dsp, "audio_dsp");
performance_counter_start(&audio_dsp);
rarch_dsp_filter_process(audio_driver_dsp, &dsp_data);
retro_dsp_filter_process(audio_driver_dsp, &dsp_data);
performance_counter_stop(&audio_dsp);
if (dsp_data.output)
@ -713,7 +713,7 @@ void audio_driver_set_volume_gain(float gain)
void audio_driver_dsp_filter_free(void)
{
if (audio_driver_dsp)
rarch_dsp_filter_free(audio_driver_dsp);
retro_dsp_filter_free(audio_driver_dsp);
audio_driver_dsp = NULL;
}
@ -734,7 +734,7 @@ void audio_driver_dsp_filter_init(const char *device)
if (!plugs)
goto error;
#endif
audio_driver_dsp = rarch_dsp_filter_new(
audio_driver_dsp = retro_dsp_filter_new(
device, plugs, audio_driver_input);
return;

View File

@ -36,7 +36,7 @@
#include <audio/dsp_filter.h>
struct rarch_dsp_plug
struct retro_dsp_plug
{
#ifdef HAVE_DYLIB
dylib_t lib;
@ -44,25 +44,25 @@ struct rarch_dsp_plug
const struct dspfilter_implementation *impl;
};
struct rarch_dsp_instance
struct retro_dsp_instance
{
const struct dspfilter_implementation *impl;
void *impl_data;
};
struct rarch_dsp_filter
struct retro_dsp_filter
{
config_file_t *conf;
struct rarch_dsp_plug *plugs;
struct retro_dsp_plug *plugs;
unsigned num_plugs;
struct rarch_dsp_instance *instances;
struct retro_dsp_instance *instances;
unsigned num_instances;
};
static const struct dspfilter_implementation *find_implementation(
rarch_dsp_filter_t *dsp, const char *ident)
retro_dsp_filter_t *dsp, const char *ident)
{
unsigned i;
for (i = 0; i < dsp->num_plugs; i++)
@ -83,16 +83,16 @@ static const struct dspfilter_config dspfilter_config = {
config_userdata_free,
};
static bool create_filter_graph(rarch_dsp_filter_t *dsp, float sample_rate)
static bool create_filter_graph(retro_dsp_filter_t *dsp, float sample_rate)
{
unsigned i;
struct rarch_dsp_instance *instances = NULL;
struct retro_dsp_instance *instances = NULL;
unsigned filters = 0;
if (!config_get_uint(dsp->conf, "filters", &filters))
return false;
instances = (struct rarch_dsp_instance*)calloc(filters, sizeof(*instances));
instances = (struct retro_dsp_instance*)calloc(filters, sizeof(*instances));
if (!instances)
return false;
@ -152,11 +152,11 @@ static const dspfilter_get_implementation_t dsp_plugs_builtin[] = {
chorus_dspfilter_get_implementation,
};
static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
static bool append_plugs(retro_dsp_filter_t *dsp, struct string_list *list)
{
unsigned i;
dspfilter_simd_mask_t mask = cpu_features_get();
struct rarch_dsp_plug *plugs = (struct rarch_dsp_plug*)
struct retro_dsp_plug *plugs = (struct retro_dsp_plug*)
calloc(ARRAY_SIZE(dsp_plugs_builtin), sizeof(*plugs));
if (!plugs)
@ -175,7 +175,7 @@ static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
return true;
}
#elif defined(HAVE_DYLIB)
static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
static bool append_plugs(retro_dsp_filter_t *dsp, struct string_list *list)
{
unsigned i;
dspfilter_simd_mask_t mask = cpu_features_get();
@ -184,7 +184,7 @@ static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
{
dspfilter_get_implementation_t cb;
const struct dspfilter_implementation *impl = NULL;
struct rarch_dsp_plug *new_plugs = NULL;
struct retro_dsp_plug *new_plugs = NULL;
dylib_t lib =
dylib_load(list->elems[i].data);
@ -211,7 +211,7 @@ static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
continue;
}
new_plugs = (struct rarch_dsp_plug*)
new_plugs = (struct retro_dsp_plug*)
realloc(dsp->plugs, sizeof(*dsp->plugs) * (dsp->num_plugs + 1));
if (!new_plugs)
{
@ -231,14 +231,14 @@ static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
}
#endif
rarch_dsp_filter_t *rarch_dsp_filter_new(
retro_dsp_filter_t *retro_dsp_filter_new(
const char *filter_config,
void *string_data,
float sample_rate)
{
config_file_t *conf = NULL;
struct string_list *plugs = NULL;
rarch_dsp_filter_t *dsp = (rarch_dsp_filter_t*)calloc(1, sizeof(*dsp));
retro_dsp_filter_t *dsp = (retro_dsp_filter_t*)calloc(1, sizeof(*dsp));
if (!dsp)
return NULL;
@ -269,11 +269,11 @@ rarch_dsp_filter_t *rarch_dsp_filter_new(
error:
if (plugs)
string_list_free(plugs);
rarch_dsp_filter_free(dsp);
retro_dsp_filter_free(dsp);
return NULL;
}
void rarch_dsp_filter_free(rarch_dsp_filter_t *dsp)
void retro_dsp_filter_free(retro_dsp_filter_t *dsp)
{
unsigned i;
if (!dsp)
@ -301,8 +301,8 @@ void rarch_dsp_filter_free(rarch_dsp_filter_t *dsp)
free(dsp);
}
void rarch_dsp_filter_process(rarch_dsp_filter_t *dsp,
struct rarch_dsp_data *data)
void retro_dsp_filter_process(retro_dsp_filter_t *dsp,
struct retro_dsp_data *data)
{
unsigned i;
struct dspfilter_output output = {0};

View File

@ -27,25 +27,25 @@
RETRO_BEGIN_DECLS
typedef struct rarch_dsp_filter rarch_dsp_filter_t;
typedef struct retro_dsp_filter retro_dsp_filter_t;
rarch_dsp_filter_t *rarch_dsp_filter_new(const char *filter_config,
retro_dsp_filter_t *retro_dsp_filter_new(const char *filter_config,
void *string_data, float sample_rate);
void rarch_dsp_filter_free(rarch_dsp_filter_t *dsp);
void retro_dsp_filter_free(retro_dsp_filter_t *dsp);
struct rarch_dsp_data
struct retro_dsp_data
{
float *input;
unsigned input_frames;
/* Set by rarch_dsp_filter_process(). */
/* Set by retro_dsp_filter_process(). */
float *output;
unsigned output_frames;
};
void rarch_dsp_filter_process(rarch_dsp_filter_t *dsp,
struct rarch_dsp_data *data);
void retro_dsp_filter_process(retro_dsp_filter_t *dsp,
struct retro_dsp_data *data);
RETRO_END_DECLS