From 0c9758820c838eb84c5f334c99f1fc6d92a2b740 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Fri, 28 Apr 2017 13:48:36 -0700 Subject: Add NULL macOs implementation for 'MAINT-6950 Shared media a great distance away (different region even) sometimes plays at maximum volume when entering a region or moving camera slightly.' - until we can understand how to make real mac_volume_catcher work --- indra/media_plugins/cef/CMakeLists.txt | 16 +++- .../media_plugins/cef/mac_volume_catcher_null.cpp | 95 ++++++++++++++++++++++ 2 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 indra/media_plugins/cef/mac_volume_catcher_null.cpp diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index be3cec19c6..5452fd9d1e 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -57,9 +57,21 @@ set (media_plugin_cef_LINK_LIBRARIES ${LLCOMMON_LIBRARIES} ${PLUGIN_API_WINDOWS_LIBRARIES}) -if (WINDOWS) +# Select which VolumeCatcher implementation to use +if (LINUX) + message(FATAL_ERROR "CEF plugin has been enabled for a Linux compile.\n" + " Please create a volume_catcher implementation for this platform.") +elseif (DARWIN) + list(APPEND media_plugin_cef_SOURCE_FILES mac_volume_catcher_null.cpp) + find_library(CORESERVICES_LIBRARY CoreServices) + find_library(AUDIOUNIT_LIBRARY AudioUnit) + list(APPEND media_plugin_cef_LINK_LIBRARIES + ${CORESERVICES_LIBRARY} # for Component Manager calls + ${AUDIOUNIT_LIBRARY} # for AudioUnit calls + ) +elseif (WINDOWS) list(APPEND media_plugin_cef_SOURCE_FILES windows_volume_catcher.cpp) -endif (WINDOWS) +endif (LINUX) set_source_files_properties(${media_plugin_cef_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/indra/media_plugins/cef/mac_volume_catcher_null.cpp b/indra/media_plugins/cef/mac_volume_catcher_null.cpp new file mode 100644 index 0000000000..f4fcef71aa --- /dev/null +++ b/indra/media_plugins/cef/mac_volume_catcher_null.cpp @@ -0,0 +1,95 @@ +/** + * @file windows_volume_catcher.cpp + * @brief A null implementation of volume level control of all audio channels opened by a process. + * We are using this for the macOS version for now until we can understand how to make the + * exitising mac_volume_catcher.cpp work without the (now, non-existant) QuickTime dependency + * + * @cond + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + * @endcond + */ + +#include "volume_catcher.h" +#include "llsingleton.h" +class VolumeCatcherImpl : public LLSingleton +{ + 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: + F32 mVolume; + F32 mPan; + bool mSystemIsVistaOrHigher; +}; + +VolumeCatcherImpl::VolumeCatcherImpl() +: mVolume(1.0f), // default volume is max + mPan(0.f) // default pan is centered +{ +} + +VolumeCatcherImpl::~VolumeCatcherImpl() +{ +} + +void VolumeCatcherImpl::setVolume(F32 volume) +{ + mVolume = volume; +} + +void VolumeCatcherImpl::setPan(F32 pan) +{ // remember pan for calculating individual channel levels later + mPan = pan; +} + +///////////////////////////////////////////////////// + +VolumeCatcher::VolumeCatcher() +{ + pimpl = VolumeCatcherImpl::getInstance(); +} + +VolumeCatcher::~VolumeCatcher() +{ + // Let the instance persist until exit. +} + +void VolumeCatcher::setVolume(F32 volume) +{ + pimpl->setVolume(volume); +} + +void VolumeCatcher::setPan(F32 pan) +{ + pimpl->setPan(pan); +} + +void VolumeCatcher::pump() +{ + // No periodic tasks are necessary for this implementation. +} -- cgit v1.2.3 From a32ec9e983c2aaf991ffff88fb5ad283c0b895d1 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Fri, 28 Apr 2017 13:51:09 -0700 Subject: Pull in Nickyd's changes to APR and LLCEFLib (Dullahan) for MAINT-6116 Console window appears breifly for Flash sites --- autobuild.xml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index f5f0c3e6f6..534b9a0478 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -76,9 +76,9 @@ archive hash - ae733dd8f2c83055030ea6e08c623306 + f65774ebabb256f2d217a872b0cf2b5b url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/745/1534/apr_suite-1.4.5.500735-darwin64-500735.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4812/15284/apr_suite-1.4.5.504800-darwin64-504800.tar.bz2 name darwin64 @@ -100,9 +100,9 @@ archive hash - bc8855c8253b8293c7e61af7b1ed0f05 + 84a1a140f20b25d714949185e854d14b url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/744/1545/apr_suite-1.4.5.500735-linux64-500735.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4811/15302/apr_suite-1.4.5.504800-linux64-504800.tar.bz2 name linux64 @@ -112,9 +112,9 @@ archive hash - f80a5551e8a0257efd7a73ed9bbf18f1 + dc80eca3d113b038b469003da8cd6638 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4174/11812/apr_suite-1.4.5.504161-windows-504161.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4813/15290/apr_suite-1.4.5.504800-windows-504800.tar.bz2 name windows @@ -124,16 +124,16 @@ archive hash - ff2fc463385024c37532c0cc73c1c989 + 63146d3d3d5fe7aa6be1a1b0afed36dd url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4172/11806/apr_suite-1.4.5.504161-windows64-504161.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4814/15296/apr_suite-1.4.5.504800-windows64-504800.tar.bz2 name windows64 version - 1.4.5.504161 + 1.4.5.504800 boost @@ -526,9 +526,9 @@ archive hash - 9005fcda30e6659790e2fdfc27d4e2ee + 2924fbd14d8d5346dff79a9834a3dd00 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4384/12984/dullahan-1.1.764_3.2987.1591.gd3e47f5-darwin64-504373.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4804/15260/dullahan-1.1.764_3.2987.1591.gd3e47f5-darwin64-504793.tar.bz2 name darwin64 @@ -538,9 +538,9 @@ archive hash - f537886de9bb68d8698f08fecaa843f3 + 45a2dc847fe3348ced66f9f81802f7e4 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4536/13621/dullahan-1.1.764_3.2987.1591.gd3e47f5-windows-504524.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4806/15271/dullahan-1.1.764_3.2987.1591.gd3e47f5-windows-504793.tar.bz2 name windows @@ -550,9 +550,9 @@ archive hash - 5d841fad742e58a050fb529b2f5ab965 + 2bd634d9b5ec8710e7a898dddb7231b2 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4535/13626/dullahan-1.1.764_3.2987.1591.gd3e47f5-windows64-504524.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4805/15265/dullahan-1.1.764_3.2987.1591.gd3e47f5-windows64-504793.tar.bz2 name windows64 -- cgit v1.2.3