From bfe221d571de2ca1df07dcbe68439c47351166b1 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 10 Apr 2019 11:15:39 -0400 Subject: [PATCH] Oh right, this complained... --- indra/plugins/cef/windows_volume_catcher.cpp | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/indra/plugins/cef/windows_volume_catcher.cpp b/indra/plugins/cef/windows_volume_catcher.cpp index daaca7b40..fe3778d99 100644 --- a/indra/plugins/cef/windows_volume_catcher.cpp +++ b/indra/plugins/cef/windows_volume_catcher.cpp @@ -26,33 +26,35 @@ * @endcond */ +#include "linden_common.h" + #include "volume_catcher.h" -#include #include "llsingleton.h" + +#include "llwin32headers.h" +#include + class VolumeCatcherImpl : public LLSingleton { -friend LLSingleton; + friend LLSingleton; + VolumeCatcherImpl(); + // This is a singleton class -- both callers and the component implementation should use getInstance() to find the instance. + ~VolumeCatcherImpl(); + public: void setVolume(F32 volume); void setPan(F32 pan); private: - // This is a singleton class -- both callers and the component implementation should use getInstance() to find the instance. - VolumeCatcherImpl(); - ~VolumeCatcherImpl(); - F32 mVolume; F32 mPan; }; - - VolumeCatcherImpl::VolumeCatcherImpl() : mVolume(1.0f), // default volume is max mPan(0.f) // default pan is centered { - } VolumeCatcherImpl::~VolumeCatcherImpl() @@ -68,7 +70,7 @@ void VolumeCatcherImpl::setVolume(F32 volume) DWORD left_channel = (DWORD)(mVolume * 65535.0f); DWORD right_channel = (DWORD)(mVolume * 65535.0f); DWORD hw_volume = left_channel << 16 | right_channel; - ::waveOutSetVolume(NULL, hw_volume); + waveOutSetVolume(NULL, hw_volume); } void VolumeCatcherImpl::setPan(F32 pan)