Divorce driver->resampler from driver_t struct
This commit is contained in:
parent
18926e4df5
commit
229c25dfc7
|
@ -62,6 +62,7 @@ typedef struct audio_driver_input_data
|
|||
uint64_t buffer_free_samples_count;
|
||||
} audio_driver_input_data_t;
|
||||
|
||||
static const rarch_resampler_t *audio_resampler;
|
||||
static void *audio_resampler_data;
|
||||
static const audio_driver_t *current_audio;
|
||||
static void *context_audio_data;
|
||||
|
@ -250,7 +251,7 @@ static bool uninit_audio(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
rarch_resampler_freep(&driver->resampler,
|
||||
rarch_resampler_freep(&audio_resampler,
|
||||
&audio_resampler_data);
|
||||
|
||||
if (audio_data.audio_callback.callback)
|
||||
|
@ -372,7 +373,7 @@ static bool init_audio(void)
|
|||
(double)settings->audio.out_rate / audio_data.in_rate;
|
||||
|
||||
if (!rarch_resampler_realloc(&audio_resampler_data,
|
||||
&driver->resampler,
|
||||
&audio_resampler,
|
||||
settings->audio.resampler, audio_data.orig_src_ratio))
|
||||
{
|
||||
RARCH_ERR("Failed to initialize resampler \"%s\".\n",
|
||||
|
@ -552,7 +553,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
|||
|
||||
rarch_perf_init(&resampler_proc, "resampler_proc");
|
||||
retro_perf_start(&resampler_proc);
|
||||
rarch_resampler_process(driver->resampler, audio_resampler_data, &src_data);
|
||||
rarch_resampler_process(audio_resampler, audio_resampler_data, &src_data);
|
||||
retro_perf_stop(&resampler_proc);
|
||||
|
||||
output_data = audio_data.outsamples;
|
||||
|
|
1
driver.h
1
driver.h
|
@ -202,7 +202,6 @@ typedef struct driver
|
|||
const input_driver_t *input;
|
||||
const camera_driver_t *camera;
|
||||
const location_driver_t *location;
|
||||
const rarch_resampler_t *resampler;
|
||||
const record_driver_t *recording;
|
||||
struct retro_callbacks retro_ctx;
|
||||
const struct font_renderer *font_osd_driver;
|
||||
|
|
Loading…
Reference in New Issue