summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-09-05 15:20:05 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-09-05 15:20:05 +0000
commit105fb605d0edc726b6b78522870d38a683012bd5 (patch)
tree7ea10a6028fc94f893edca9498058c308a4c105b /plugins
parent6af1c66b497435c9cb864020472e993bea548113 (diff)
downloadpcsxr-105fb605d0edc726b6b78522870d38a683012bd5.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@29040 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfsound/alsa.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/dfsound/alsa.c b/plugins/dfsound/alsa.c
index e1fe46f6..90ce26b8 100644
--- a/plugins/dfsound/alsa.c
+++ b/plugins/dfsound/alsa.c
@@ -265,17 +265,17 @@ void CALLBACK SPUplayCDDAchannel(short* pcm, int nbytes)
for (i = 0; i < size / 4; i++)
{
- s = p[i*2] | (p[i*2+1] << 8);
+ s = (short)(p[i*4] | (p[i*4+1] << 8));
s *= iLeftXAVol;
s /= 32767;
- cdda_buf[i*2] = (s & 0xFF);
- cdda_buf[i*2+1] = ((s & 0xFF00) >> 8);
+ cdda_buf[i*4] = (s & 0xFF);
+ cdda_buf[i*4+1] = ((s & 0xFF00) >> 8);
- s = p[i*2+2] | (p[i*2+3] << 8);
+ s = (short)(p[i*4+2] | (p[i*4+3] << 8));
s *= iRightXAVol;
s /= 32767;
- cdda_buf[i*2+2] = (s & 0xFF);
- cdda_buf[i*2+3] = ((s & 0xFF00) >> 8);
+ cdda_buf[i*4+2] = (s & 0xFF);
+ cdda_buf[i*4+3] = ((s & 0xFF00) >> 8);
}
if (snd_pcm_state(handle_cdda) == SND_PCM_STATE_XRUN)