notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sms wip: random tweaks, refactoring (palette, sound stuff, etc)
[picodrive.git]
/
pico
/
sound
/
sound.c
diff --git
a/pico/sound/sound.c
b/pico/sound/sound.c
index
7f3fd8d
..
a7510db
100644
(file)
--- a/
pico/sound/sound.c
+++ b/
pico/sound/sound.c
@@
-398,7
+398,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
+414,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 = length, *p = (void *)PsndOut;
\r
+ while (i--)
\r
+ *p |= *p << 16;
\r
+ }
\r
\r
if (PicoWriteSound != NULL)
\r
PicoWriteSound(length);
\r
\r
if (PicoWriteSound != NULL)
\r
PicoWriteSound(length);
\r