summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2018-11-20 15:53:43 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2018-11-20 15:53:43 +0200
commitfaf79976c0ad3ea9406f3c13348c6ee27837ef2c (patch)
treeaf4e227b3ef60dc5b3ffc6d4cc61fc7e759aa395 /indra
parentbaeca41027d586871fd38fb2c9d8684f747231c7 (diff)
SL-10094 FIXED Mute sound should ONLY mute the viewer's sounds, not the whole computer's (Mac) sound.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappviewermacosx.cpp62
-rw-r--r--indra/newview/llappviewermacosx.h4
2 files changed, 0 insertions, 66 deletions
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index d472f8926b..1db48119aa 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -337,68 +337,6 @@ std::string LLAppViewerMacOSX::generateSerialNumber()
return serial_md5;
}
-static AudioDeviceID get_default_audio_output_device(void)
-{
- AudioDeviceID device = 0;
- UInt32 size = sizeof(device);
- AudioObjectPropertyAddress device_address = { kAudioHardwarePropertyDefaultOutputDevice,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster };
-
- OSStatus err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &device_address, 0, NULL, &size, &device);
- if(err != noErr)
- {
- LL_DEBUGS("SystemMute") << "Couldn't get default audio output device (0x" << std::hex << err << ")" << LL_ENDL;
- }
-
- return device;
-}
-
-//virtual
-void LLAppViewerMacOSX::setMasterSystemAudioMute(bool new_mute)
-{
- AudioDeviceID device = get_default_audio_output_device();
-
- if(device != 0)
- {
- UInt32 mute = new_mute;
- AudioObjectPropertyAddress device_address = { kAudioDevicePropertyMute,
- kAudioDevicePropertyScopeOutput,
- kAudioObjectPropertyElementMaster };
-
- OSStatus err = AudioObjectSetPropertyData(device, &device_address, 0, NULL, sizeof(mute), &mute);
- if(err != noErr)
- {
- LL_INFOS("SystemMute") << "Couldn't set audio mute property (0x" << std::hex << err << ")" << LL_ENDL;
- }
- }
-}
-
-//virtual
-bool LLAppViewerMacOSX::getMasterSystemAudioMute()
-{
- // Assume the system isn't muted
- UInt32 mute = 0;
-
- AudioDeviceID device = get_default_audio_output_device();
-
- if(device != 0)
- {
- UInt32 size = sizeof(mute);
- AudioObjectPropertyAddress device_address = { kAudioDevicePropertyMute,
- kAudioDevicePropertyScopeOutput,
- kAudioObjectPropertyElementMaster };
-
- OSStatus err = AudioObjectGetPropertyData(device, &device_address, 0, NULL, &size, &mute);
- if(err != noErr)
- {
- LL_DEBUGS("SystemMute") << "Couldn't get audio mute property (0x" << std::hex << err << ")" << LL_ENDL;
- }
- }
-
- return (mute != 0);
-}
-
void handleUrl(const char* url_utf8)
{
if (url_utf8 && gViewerAppPtr)
diff --git a/indra/newview/llappviewermacosx.h b/indra/newview/llappviewermacosx.h
index ebb41a495c..d5a80864be 100644
--- a/indra/newview/llappviewermacosx.h
+++ b/indra/newview/llappviewermacosx.h
@@ -42,10 +42,6 @@ public:
//
virtual bool init(); // Override to do application initialization
- // mute/unmute the system's master audio
- virtual void setMasterSystemAudioMute(bool mute);
- virtual bool getMasterSystemAudioMute();
-
protected:
virtual bool restoreErrorTrap();
virtual void initCrashReporting(bool reportFreeze);