summaryrefslogtreecommitdiff
path: root/indra/media_plugins/webkit
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-04-28 19:06:08 -0700
committerRichard Nelson <none@none>2010-04-28 19:06:08 -0700
commita1b765189d4b8bfb6ec99bc5e5c0a2cc4c9ccbd2 (patch)
tree4fb97ee86f5ad3551ce28a8d71f7ff2c12fef1d1 /indra/media_plugins/webkit
parentfe1413c2e52e7ba42f49aff3cadf8cf65c13278b (diff)
fix for media not working in release builds
reviewed by Mani
Diffstat (limited to 'indra/media_plugins/webkit')
-rw-r--r--indra/media_plugins/webkit/windows_volume_catcher.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/indra/media_plugins/webkit/windows_volume_catcher.cpp b/indra/media_plugins/webkit/windows_volume_catcher.cpp
index fdff28c2c1..ef96102a0a 100644
--- a/indra/media_plugins/webkit/windows_volume_catcher.cpp
+++ b/indra/media_plugins/webkit/windows_volume_catcher.cpp
@@ -34,7 +34,6 @@
#include "volume_catcher.h"
#include <windows.h>
#include "llsingleton.h"
-
class VolumeCatcherImpl : public LLSingleton<VolumeCatcherImpl>
{
friend LLSingleton<VolumeCatcherImpl>;
@@ -48,8 +47,8 @@ private:
VolumeCatcherImpl();
~VolumeCatcherImpl();
- typedef void (*set_volume_func_t)(F32);
- typedef void (*set_mute_func_t)(bool);
+ typedef void (WINAPI *set_volume_func_t)(F32);
+ typedef void (WINAPI *set_mute_func_t)(bool);
set_volume_func_t mSetVolumeFunc;
set_mute_func_t mSetMuteFunc;
@@ -57,7 +56,6 @@ private:
F32 mVolume;
F32 mPan;
};
-
VolumeCatcherImpl::VolumeCatcherImpl()
: mVolume(1.0f), // default volume is max
mPan(0.f) // default pan is centered
@@ -77,10 +75,8 @@ VolumeCatcherImpl::~VolumeCatcherImpl()
void VolumeCatcherImpl::setVolume(F32 volume)
{
- //F32 left_volume = volume * min(1.f, 1.f - mPan);
- //F32 right_volume = volume * max(0.f, 1.f + mPan);
-
mVolume = volume;
+
if (mSetMuteFunc)
{
mSetMuteFunc(volume == 0.f);
@@ -123,3 +119,4 @@ void VolumeCatcher::pump()
// No periodic tasks are necessary for this implementation.
}
+