mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
ui, revised menu and option handling, added sound filter settings
This commit is contained in:
parent
583c4840cf
commit
37631374df
10 changed files with 141 additions and 75 deletions
|
@ -57,7 +57,7 @@ extern void *p32x_bios_g, *p32x_bios_m, *p32x_bios_s;
|
|||
#define POPT_EN_STEREO (1<< 3)
|
||||
#define POPT_ALT_RENDERER (1<< 4) // 00 00x0
|
||||
#define POPT_EN_YM2413 (1<< 5)
|
||||
// unused (1<< 6)
|
||||
#define POPT_EN_SNDFILTER (1<< 6)
|
||||
#define POPT_ACC_SPRITES (1<< 7)
|
||||
#define POPT_DIS_32C_BORDER (1<< 8) // 00 0x00
|
||||
#define POPT_EXT_FM (1<< 9)
|
||||
|
@ -102,8 +102,7 @@ typedef struct
|
|||
unsigned short overclockM68k; // overclock the emulated 68k, in %
|
||||
|
||||
int sndRate; // rate in Hz
|
||||
unsigned short sndFilter; // Set low pass sound filter 0: off, 1: on (use integer in case we want to add other filter types later)
|
||||
int32_t sndFilterRange; // Low pass sound filter range [0, 65536]
|
||||
int sndFilterAlpha; // Low pass sound filter alpha (Q16)
|
||||
short *sndOut; // PCM output buffer
|
||||
void (*writeSound)(int len); // write .sndOut callback, called once per frame
|
||||
|
||||
|
|
|
@ -50,8 +50,6 @@ PICO_INTERNAL void PsndReset(void)
|
|||
// PsndRerate calls YM2612Init, which also resets
|
||||
PsndRerate(0);
|
||||
timers_reset();
|
||||
|
||||
mix_reset(PicoIn.sndFilter ? PicoIn.sndFilterRange : 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -106,6 +104,7 @@ void PsndRerate(int preserve_state)
|
|||
|
||||
// set mixer
|
||||
PsndMix_32_to_16l = (PicoIn.opt & POPT_EN_STEREO) ? mix_32_to_16l_stereo : mix_32_to_16_mono;
|
||||
mix_reset(PicoIn.opt & POPT_EN_SNDFILTER ? PicoIn.sndFilterAlpha : 0);
|
||||
|
||||
if (PicoIn.AHW & PAHW_PICO)
|
||||
PicoReratePico();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue