aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authornotaz2014-12-19 03:33:20 +0200
committernotaz2014-12-20 02:57:25 +0200
commit3154bfab51566cbaa5bce3965d4c915bfb1b4f53 (patch)
treeb383eae373237f74e209bd08a2ddc1d8058b9a03 /frontend
parentd618a2409c80f627a43c89791ce3f7bc38a48648 (diff)
downloadpcsx_rearmed-3154bfab51566cbaa5bce3965d4c915bfb1b4f53.tar.gz
pcsx_rearmed-3154bfab51566cbaa5bce3965d4c915bfb1b4f53.tar.bz2
pcsx_rearmed-3154bfab51566cbaa5bce3965d4c915bfb1b4f53.zip
spu: put globals into a structure
- also clean up some unused stuff - put spu config into it's own structure and header
Diffstat (limited to 'frontend')
-rw-r--r--frontend/main.c23
-rw-r--r--frontend/menu.c25
2 files changed, 22 insertions, 26 deletions
diff --git a/frontend/main.c b/frontend/main.c
index acebaae..426ef13 100644
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -25,6 +25,7 @@
#include "../libpcsxcore/cheat.h"
#include "../libpcsxcore/new_dynarec/new_dynarec.h"
#include "../plugins/cdrcimg/cdrcimg.h"
+#include "../plugins/dfsound/spu_config.h"
#include "revision.h"
#ifndef NO_FRONTEND
@@ -44,12 +45,6 @@ static void check_memcards(void);
void StartDebugger();
void StopDebugger();
-// sound plugin
-extern int iUseReverb;
-extern int iUseInterpolation;
-extern int iXAPitch;
-extern int iVolume;
-
int ready_to_go, g_emu_want_quit, g_emu_resetting;
unsigned long gpuDisp;
char cfgfile_basename[MAXPATHLEN];
@@ -141,13 +136,15 @@ void emu_set_default_config(void)
pl_rearmed_cbs.gpu_peopsgl.iVRamSize = 64;
pl_rearmed_cbs.gpu_peopsgl.iTexGarbageCollection = 1;
- iUseReverb = 2;
- iUseInterpolation = 1;
- iXAPitch = 0;
- iVolume = 768;
-#ifndef __ARM_ARCH_7A__ /* XXX */
- iUseReverb = 0;
- iUseInterpolation = 0;
+ spu_config.iUseReverb = 1;
+ spu_config.iUseInterpolation = 1;
+ spu_config.iXAPitch = 0;
+ spu_config.iVolume = 768;
+ spu_config.iTempo = 0;
+#if defined(__arm__) && !defined(__ARM_ARCH_7A__) /* XXX */
+ spu_config.iUseReverb = 0;
+ spu_config.iUseInterpolation = 0;
+ spu_config.iTempo = 1;
#endif
new_dynarec_hacks = 0;
cycle_multiplier = 200;
diff --git a/frontend/menu.c b/frontend/menu.c
index 199020d..1562735 100644
--- a/frontend/menu.c
+++ b/frontend/menu.c
@@ -37,6 +37,7 @@
#include "../libpcsxcore/cheat.h"
#include "../libpcsxcore/new_dynarec/new_dynarec.h"
#include "../plugins/dfinput/externals.h"
+#include "../plugins/dfsound/spu_config.h"
#include "psemu_plugin_defs.h"
#include "revision.h"
@@ -102,12 +103,6 @@ int soft_filter;
#define DEFAULT_PSX_CLOCK_S "50"
#endif
-// sound plugin
-extern int iUseReverb;
-extern int iUseInterpolation;
-extern int iXAPitch;
-extern int iVolume;
-
static const char *bioses[24];
static const char *gpu_plugins[16];
static const char *spu_plugins[16];
@@ -318,7 +313,7 @@ static void menu_sync_config(void)
allow_abs_only_old = in_evdev_allow_abs_only;
}
- iVolume = 768 + 128 * volume_boost;
+ spu_config.iVolume = 768 + 128 * volume_boost;
pl_rearmed_cbs.frameskip = frameskip - 1;
pl_timing_prepare(Config.PsxType);
}
@@ -431,9 +426,10 @@ static const struct {
CE_INTVAL_P(gpu_peopsgl.iVRamSize),
CE_INTVAL_P(gpu_peopsgl.iTexGarbageCollection),
CE_INTVAL_P(gpu_peopsgl.dwActFixes),
- CE_INTVAL_V(iUseReverb, 3),
- CE_INTVAL_V(iXAPitch, 3),
- CE_INTVAL_V(iUseInterpolation, 3),
+ CE_INTVAL(spu_config.iUseReverb),
+ CE_INTVAL(spu_config.iXAPitch),
+ CE_INTVAL(spu_config.iUseInterpolation),
+ CE_INTVAL(spu_config.iTempo),
CE_INTVAL(config_save_counter),
CE_INTVAL(in_evdev_allow_abs_only),
CE_INTVAL(volume_boost),
@@ -1400,13 +1396,16 @@ static int menu_loop_plugin_gpu_peopsgl(int id, int keys)
static const char *men_spu_interp[] = { "None", "Simple", "Gaussian", "Cubic", NULL };
static const char h_spu_volboost[] = "Large values cause distortion";
+static const char h_spu_tempo[] = "Slows down audio if emu is too slow\n"
+ "This is inaccurate and breaks games";
static menu_entry e_menu_plugin_spu[] =
{
mee_range_h ("Volume boost", 0, volume_boost, -5, 30, h_spu_volboost),
- mee_onoff ("Reverb", 0, iUseReverb, 2),
- mee_enum ("Interpolation", 0, iUseInterpolation, men_spu_interp),
- mee_onoff ("Adjust XA pitch", 0, iXAPitch, 1),
+ mee_onoff ("Reverb", 0, spu_config.iUseReverb, 1),
+ mee_enum ("Interpolation", 0, spu_config.iUseInterpolation, men_spu_interp),
+ mee_onoff ("Adjust XA pitch", 0, spu_config.iXAPitch, 1),
+ mee_onoff_h ("Adjust tempo", 0, spu_config.iTempo, 1, h_spu_tempo),
mee_end,
};