summaryrefslogtreecommitdiff
path: root/indra/media_plugins/winmmshim
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-04-30 17:01:41 -0700
committerRichard Nelson <none@none>2010-04-30 17:01:41 -0700
commitabc6aef7804d0572c0b8ec469aa607f4dabfdad5 (patch)
tree708b0ae4e6cda60793c8b4c48ca0107e0d5e9a12 /indra/media_plugins/winmmshim
parent7eaae1fe819aef7dc8ac20387e62c3d13ab6d72f (diff)
parent0ea9fa8d9425cd89a6a8b01b6dc56696ea1b9033 (diff)
merge
Diffstat (limited to 'indra/media_plugins/winmmshim')
-rw-r--r--indra/media_plugins/winmmshim/winmm_shim.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp
index 54bfa652e9..6fbf517d7c 100644
--- a/indra/media_plugins/winmmshim/winmm_shim.cpp
+++ b/indra/media_plugins/winmmshim/winmm_shim.cpp
@@ -120,8 +120,8 @@ extern "C"
{ // zero out the audio buffer when muted
memset(pwh->lpData, 0, pwh->dwBufferLength);
}
- else
- {
+ else if (sVolumeLevel != 1.f)
+ { // need to apply volume level
wave_out_map_t::iterator found_it = sWaveOuts.find(hwo);
if (found_it != sWaveOuts.end())
{
@@ -163,10 +163,11 @@ extern "C"
// the captain has turned off the MMX sign, you are now free to use floating point registers
_mm_empty();
+ // finish remaining samples that didn't fit into 64 bit register
for (short* sample_16 = (short*)sample_64;
sample_16 < (short*)(pwh->lpData + pwh->dwBufferLength);
++sample_16)
- { // finish remaining samples that didn't fit into 64 bit register
+ {
*sample_16 = (*sample_16 * volume_16) >> 15;
}