summaryrefslogtreecommitdiff
path: root/hw/gusemu_mixer.c
diff options
context:
space:
mode:
authormalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-08 01:42:47 +0000
committermalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-08 01:42:47 +0000
commitf16ca0ddcdc0340f49c6ef77720b4c09e4638841 (patch)
tree017390d5d858f6b73c711ca6d86c7d5fe1cb3a9a /hw/gusemu_mixer.c
parente06ec4ccf07f2f4d00236e2321957c1de6668786 (diff)
downloadqemu-f16ca0ddcdc0340f49c6ef77720b4c09e4638841.tar.gz
qemu-f16ca0ddcdc0340f49c6ef77720b4c09e4638841.tar.bz2
qemu-f16ca0ddcdc0340f49c6ef77720b4c09e4638841.zip
Fix some signedness issues caught by gcc 4.3
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4696 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/gusemu_mixer.c')
-rw-r--r--hw/gusemu_mixer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/gusemu_mixer.c b/hw/gusemu_mixer.c
index b3b5aa5d79..6d8d9ced11 100644
--- a/hw/gusemu_mixer.c
+++ b/hw/gusemu_mixer.c
@@ -33,7 +33,7 @@
/* samples are always 16bit stereo (4 bytes each, first right then left interleaved) */
void gus_mixvoices(GUSEmuState * state, unsigned int playback_freq, unsigned int numsamples,
- short *bufferpos)
+ GUSsample *bufferpos)
{
/* note that byte registers are stored in the upper half of each voice register! */
GUSbyte *gusptr;
@@ -170,8 +170,8 @@ void gus_mixvoices(GUSEmuState * state, unsigned int playback_freq, unsigned int
}
/* mix samples into buffer */
- *(bufferpos + 2 * sample) += (short) ((sample1 * PanningPos) >> 4); /* right */
- *(bufferpos + 2 * sample + 1) += (short) ((sample1 * (15 - PanningPos)) >> 4); /* left */
+ *(bufferpos + 2 * sample) += (GUSsample) ((sample1 * PanningPos) >> 4); /* right */
+ *(bufferpos + 2 * sample + 1) += (GUSsample) ((sample1 * (15 - PanningPos)) >> 4); /* left */
}
/* write back voice and volume */
GUSvoice(wVSRCurrVol) = Volume32 / 32;