summaryrefslogtreecommitdiff
path: root/indra/media_plugins/winmmshim
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-30 10:10:16 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-30 10:10:16 +0100
commit6f339d5e9eb0a43f70effdf069d414e0ee7fff2c (patch)
treec8070823806fbeb68ea0813d9a766a1b1db458f2 /indra/media_plugins/winmmshim
parent4f46e777a501ff0bfedaf657ac6decdeba8acbe5 (diff)
parentd597a7e36a0a8c4cbee70b053c41aa01afeab6b5 (diff)
merge from viewer-trunk
Diffstat (limited to 'indra/media_plugins/winmmshim')
-rw-r--r--indra/media_plugins/winmmshim/winmm_shim.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp
index f7df3b19a0..54bfa652e9 100644
--- a/indra/media_plugins/winmmshim/winmm_shim.cpp
+++ b/indra/media_plugins/winmmshim/winmm_shim.cpp
@@ -144,10 +144,11 @@ extern "C"
// copy volume level 4 times into 64 bit MMX register
__m64 volume_64 = _mm_set_pi16(volume_16, volume_16, volume_16, volume_16);
- __m64 *sample_64;
+ __m64* sample_64;
+ __m64* last_sample_64 = (__m64*)(pwh->lpData + pwh->dwBufferLength - sizeof(__m64));
// for everything that can be addressed in 64 bit multiples...
for (sample_64 = (__m64*)pwh->lpData;
- sample_64 < (__m64*)(pwh->lpData + pwh->dwBufferLength);
+ sample_64 <= last_sample_64;
++sample_64)
{
//...multiply the samples by the volume...