notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improve z80 reset handling (drZ80 at least)
[picodrive.git]
/
pico
/
sound
/
sound.c
diff --git
a/pico/sound/sound.c
b/pico/sound/sound.c
index
5a9b8b3
..
5bb8e9d
100644
(file)
--- a/
pico/sound/sound.c
+++ b/
pico/sound/sound.c
@@
-291,7
+291,7
@@
PICO_INTERNAL void PsndClear(void)
memset32((int *) PsndOut, 0, len); // assume PsndOut to be aligned
\r
else {
\r
short *out = PsndOut;
\r
memset32((int *) PsndOut, 0, len); // assume PsndOut to be aligned
\r
else {
\r
short *out = PsndOut;
\r
- if ((
int
)out & 2) { *out++ = 0; len--; }
\r
+ if ((
long
)out & 2) { *out++ = 0; len--; }
\r
memset32((int *) out, 0, len/2);
\r
if (len & 1) out[len-1] = 0;
\r
}
\r
memset32((int *) out, 0, len/2);
\r
if (len & 1) out[len-1] = 0;
\r
}
\r
@@
-308,6
+308,8
@@
static int PsndRender(int offset, int length)
(Pico_mcd->pcm.control & 0x80) && Pico_mcd->pcm.enabled;
\r
offset <<= stereo;
\r
\r
(Pico_mcd->pcm.control & 0x80) && Pico_mcd->pcm.enabled;
\r
offset <<= stereo;
\r
\r
+ pprof_start(sound);
\r
+
\r
#if !SIMPLE_WRITE_SOUND
\r
if (offset == 0) { // should happen once per frame
\r
// compensate for float part of PsndLen
\r
#if !SIMPLE_WRITE_SOUND
\r
if (offset == 0) { // should happen once per frame
\r
// compensate for float part of PsndLen
\r
@@
-362,6
+364,8
@@
static int PsndRender(int offset, int length)
// convert + limit to normal 16bit output
\r
PsndMix_32_to_16l(PsndOut+offset, buf32, length);
\r
\r
// convert + limit to normal 16bit output
\r
PsndMix_32_to_16l(PsndOut+offset, buf32, length);
\r
\r
+ pprof_end(sound);
\r
+
\r
return length;
\r
}
\r
\r
return length;
\r
}
\r
\r