diff options
| -rw-r--r-- | autobuild.xml | 30 | ||||
| -rw-r--r-- | indra/media_plugins/cef/CMakeLists.txt | 16 | ||||
| -rw-r--r-- | indra/media_plugins/cef/mac_volume_catcher_null.cpp | 95 | 
3 files changed, 124 insertions, 17 deletions
diff --git a/autobuild.xml b/autobuild.xml index f5f0c3e6f6..534b9a0478 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -76,9 +76,9 @@              <key>archive</key>              <map>                <key>hash</key> -              <string>ae733dd8f2c83055030ea6e08c623306</string> +              <string>f65774ebabb256f2d217a872b0cf2b5b</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/745/1534/apr_suite-1.4.5.500735-darwin64-500735.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4812/15284/apr_suite-1.4.5.504800-darwin64-504800.tar.bz2</string>              </map>              <key>name</key>              <string>darwin64</string> @@ -100,9 +100,9 @@              <key>archive</key>              <map>                <key>hash</key> -              <string>bc8855c8253b8293c7e61af7b1ed0f05</string> +              <string>84a1a140f20b25d714949185e854d14b</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/744/1545/apr_suite-1.4.5.500735-linux64-500735.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4811/15302/apr_suite-1.4.5.504800-linux64-504800.tar.bz2</string>              </map>              <key>name</key>              <string>linux64</string> @@ -112,9 +112,9 @@              <key>archive</key>              <map>                <key>hash</key> -              <string>f80a5551e8a0257efd7a73ed9bbf18f1</string> +              <string>dc80eca3d113b038b469003da8cd6638</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4174/11812/apr_suite-1.4.5.504161-windows-504161.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4813/15290/apr_suite-1.4.5.504800-windows-504800.tar.bz2</string>              </map>              <key>name</key>              <string>windows</string> @@ -124,16 +124,16 @@              <key>archive</key>              <map>                <key>hash</key> -              <string>ff2fc463385024c37532c0cc73c1c989</string> +              <string>63146d3d3d5fe7aa6be1a1b0afed36dd</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4172/11806/apr_suite-1.4.5.504161-windows64-504161.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4814/15296/apr_suite-1.4.5.504800-windows64-504800.tar.bz2</string>              </map>              <key>name</key>              <string>windows64</string>            </map>          </map>          <key>version</key> -        <string>1.4.5.504161</string> +        <string>1.4.5.504800</string>        </map>        <key>boost</key>        <map> @@ -526,9 +526,9 @@              <key>archive</key>              <map>                <key>hash</key> -              <string>9005fcda30e6659790e2fdfc27d4e2ee</string> +              <string>2924fbd14d8d5346dff79a9834a3dd00</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4384/12984/dullahan-1.1.764_3.2987.1591.gd3e47f5-darwin64-504373.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4804/15260/dullahan-1.1.764_3.2987.1591.gd3e47f5-darwin64-504793.tar.bz2</string>              </map>              <key>name</key>              <string>darwin64</string> @@ -538,9 +538,9 @@              <key>archive</key>              <map>                <key>hash</key> -              <string>f537886de9bb68d8698f08fecaa843f3</string> +              <string>45a2dc847fe3348ced66f9f81802f7e4</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4536/13621/dullahan-1.1.764_3.2987.1591.gd3e47f5-windows-504524.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4806/15271/dullahan-1.1.764_3.2987.1591.gd3e47f5-windows-504793.tar.bz2</string>              </map>              <key>name</key>              <string>windows</string> @@ -550,9 +550,9 @@              <key>archive</key>              <map>                <key>hash</key> -              <string>5d841fad742e58a050fb529b2f5ab965</string> +              <string>2bd634d9b5ec8710e7a898dddb7231b2</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4535/13626/dullahan-1.1.764_3.2987.1591.gd3e47f5-windows64-504524.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4805/15265/dullahan-1.1.764_3.2987.1591.gd3e47f5-windows64-504793.tar.bz2</string>              </map>              <key>name</key>              <string>windows64</string> 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<VolumeCatcherImpl> +{ +	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. +}  | 
