notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
protection and more mapper support for new mem code
[picodrive.git]
/
pico
/
sound
/
sound.c
diff --git
a/pico/sound/sound.c
b/pico/sound/sound.c
index
7f3fd8d
..
6e0db26
100644
(file)
--- a/
pico/sound/sound.c
+++ b/
pico/sound/sound.c
@@
-107,14
+107,9
@@
static void dac_recalculate(void)
\r
PICO_INTERNAL void PsndReset(void)
\r
{
\r
\r
PICO_INTERNAL void PsndReset(void)
\r
{
\r
- void *ym2612_regs;
\r
-
\r
- // also clear the internal registers+addr line
\r
- ym2612_regs = YM2612GetRegs();
\r
- memset(ym2612_regs, 0, 0x200+4);
\r
- timers_reset();
\r
-
\r
+ // PsndRerate calls YM2612Init, which also resets
\r
PsndRerate(0);
\r
PsndRerate(0);
\r
+ timers_reset();
\r
}
\r
\r
\r
}
\r
\r
\r
@@
-398,7
+393,6
@@
PICO_INTERNAL void PsndGetSamples(int y)
\r
PICO_INTERNAL void PsndGetSamplesMS(void)
\r
{
\r
\r
PICO_INTERNAL void PsndGetSamplesMS(void)
\r
{
\r
- int *buf32 = PsndBuffer;
\r
int stereo = (PicoOpt & 8) >> 3;
\r
int length = PsndLen;
\r
\r
int stereo = (PicoOpt & 8) >> 3;
\r
int length = PsndLen;
\r
\r
@@
-415,8
+409,12
@@
PICO_INTERNAL void PsndGetSamplesMS(void)
if (PicoOpt & POPT_EN_PSG)
\r
SN76496Update(PsndOut, length, stereo);
\r
\r
if (PicoOpt & POPT_EN_PSG)
\r
SN76496Update(PsndOut, length, stereo);
\r
\r
- // convert + limit to normal 16bit output
\r
- PsndMix_32_to_16l(PsndOut, buf32, length);
\r
+ // upmix to "stereo" if needed
\r
+ if (stereo) {
\r
+ int i, *p;
\r
+ for (i = length, p = (void *)PsndOut; i > 0; i--, p++)
\r
+ *p |= *p << 16;
\r
+ }
\r
\r
if (PicoWriteSound != NULL)
\r
PicoWriteSound(length);
\r
\r
if (PicoWriteSound != NULL)
\r
PicoWriteSound(length);
\r