aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authornotaz2014-12-20 02:49:35 +0200
committernotaz2014-12-20 02:59:02 +0200
commit01394a7f6afd51681cf7ef2f5d55e607a53517f2 (patch)
tree3d59545b2c9392d5563256f4ac22d0f604f2e80c /frontend
parentdb1262095fed1b02260cc4ae4a42cdd31b8ef0a4 (diff)
downloadpcsx_rearmed-01394a7f6afd51681cf7ef2f5d55e607a53517f2.tar.gz
pcsx_rearmed-01394a7f6afd51681cf7ef2f5d55e607a53517f2.tar.bz2
pcsx_rearmed-01394a7f6afd51681cf7ef2f5d55e607a53517f2.zip
libretro: add some SPU options
Diffstat (limited to 'frontend')
-rw-r--r--frontend/libretro.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c
index 524aedf..4cd4e47 100644
--- a/frontend/libretro.c
+++ b/frontend/libretro.c
@@ -19,6 +19,7 @@
#include "../libpcsxcore/cdriso.h"
#include "../libpcsxcore/cheat.h"
#include "../plugins/dfsound/out.h"
+#include "../plugins/dfsound/spu_config.h"
#include "../plugins/dfinput/externals.h"
#include "cspace.h"
#include "main.h"
@@ -249,6 +250,8 @@ void retro_set_environment(retro_environment_t cb)
{ "pcsx_rearmed_neon_enhancement_no_main", "Enhanced resolution speed hack; disabled|enabled" },
#endif
{ "pcsx_rearmed_duping_enable", "Frame duping; on|off" },
+ { "pcsx_rearmed_spu_reverb", "Sound: Reverb; on|off" },
+ { "pcsx_rearmed_spu_interpolation", "Sound: Interpolation; simple|gaussian|cubic|off" },
{ NULL, NULL },
};
@@ -1041,6 +1044,32 @@ static void update_variables(bool in_flight)
}
#endif
+ var.value = "NULL";
+ var.key = "pcsx_rearmed_spu_reverb";
+
+ if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
+ {
+ if (strcmp(var.value, "off") == 0)
+ spu_config.iUseReverb = false;
+ else if (strcmp(var.value, "on") == 0)
+ spu_config.iUseReverb = true;
+ }
+
+ var.value = "NULL";
+ var.key = "pcsx_rearmed_spu_interpolation";
+
+ if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
+ {
+ if (strcmp(var.value, "simple") == 0)
+ spu_config.iUseInterpolation = 1;
+ else if (strcmp(var.value, "gaussian") == 0)
+ spu_config.iUseInterpolation = 2;
+ else if (strcmp(var.value, "cubic") == 0)
+ spu_config.iUseInterpolation = 3;
+ else if (strcmp(var.value, "off") == 0)
+ spu_config.iUseInterpolation = 0;
+ }
+
if (in_flight) {
// inform core things about possible config changes
plugin_call_rearmed_cbs();