mirror of
https://github.com/libretro/RetroArch
synced 2025-02-08 06:40:14 +00:00
Add null resampler so we can iterate over the rsamplers and
start from right to left again when touching
This commit is contained in:
parent
1a978b0f3c
commit
2ce76ff147
@ -188,6 +188,7 @@ OBJ += frontend/frontend.o \
|
||||
audio/audio_dsp_filter.o \
|
||||
audio/drivers_resampler/sinc.o \
|
||||
audio/drivers_resampler/nearest.o \
|
||||
audio/drivers_resampler/null_resampler.o \
|
||||
audio/drivers_resampler/cc_resampler.o \
|
||||
location/drivers/nulllocation.o \
|
||||
camera/drivers/nullcamera.o \
|
||||
|
@ -31,6 +31,7 @@ static const rarch_resampler_t *resampler_drivers[] = {
|
||||
&sinc_resampler,
|
||||
&CC_resampler,
|
||||
&nearest_resampler,
|
||||
&null_resampler,
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
@ -140,6 +140,7 @@ typedef struct audio_frame_float
|
||||
extern rarch_resampler_t sinc_resampler;
|
||||
extern rarch_resampler_t CC_resampler;
|
||||
extern rarch_resampler_t nearest_resampler;
|
||||
extern rarch_resampler_t null_resampler;
|
||||
|
||||
#ifndef DONT_HAVE_STRING_LIST
|
||||
/**
|
||||
|
48
audio/drivers_resampler/null_resampler.c
Normal file
48
audio/drivers_resampler/null_resampler.c
Normal file
@ -0,0 +1,48 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2014-2016 - Ali Bouhlel ( aliaspider@gmail.com )
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "../audio_resampler_driver.h"
|
||||
typedef struct rarch_null_resampler
|
||||
{
|
||||
void *empty;
|
||||
} rarch_null_resampler_t;
|
||||
|
||||
static void resampler_null_process(
|
||||
void *re_, struct resampler_data *data)
|
||||
{
|
||||
}
|
||||
|
||||
static void resampler_null_free(void *re_)
|
||||
{
|
||||
}
|
||||
|
||||
static void *resampler_null_init(const struct resampler_config *config,
|
||||
double bandwidth_mod, resampler_simd_mask_t mask)
|
||||
{
|
||||
return (void*)0;
|
||||
}
|
||||
|
||||
rarch_resampler_t null_resampler = {
|
||||
resampler_null_init,
|
||||
resampler_null_process,
|
||||
resampler_null_free,
|
||||
RESAMPLER_API_VERSION,
|
||||
"null",
|
||||
"null"
|
||||
};
|
@ -482,6 +482,7 @@ AUDIO RESAMPLER
|
||||
#include "../audio/audio_resampler_driver.c"
|
||||
#include "../audio/drivers_resampler/sinc.c"
|
||||
#include "../audio/drivers_resampler/nearest.c"
|
||||
#include "../audio/drivers_resampler/null_resampler.c"
|
||||
#include "../audio/drivers_resampler/cc_resampler.c"
|
||||
|
||||
/*============================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user