Skip to content

Commit a5b03d1

Browse files
committed
Kill winmmshim, remove dead files
1 parent 1d29956 commit a5b03d1

15 files changed

+6
-3033
lines changed

AscentChangelog.txt

-81
This file was deleted.

doc/asset_urls.txt

-5
This file was deleted.

doc/releasenotes-where.txt

-5
This file was deleted.

doc/viewer-changes.txt

Whitespace-only changes.

indra/newview/viewer_manifest.py

-5
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,6 @@ def construct(self):
322322
self.path("media_plugin_webkit.dll")
323323
self.end_prefix()
324324

325-
# Plugin volume control
326-
if not self.is_win64() and self.prefix(src='../plugins/winmmshim/%s' % self.args['configuration'], dst=""):
327-
self.path("winmm.dll")
328-
self.end_prefix()
329-
330325
# For WebKit/Qt plugin runtimes
331326
if self.prefix(src=self.args['configuration']+"/llplugin", dst="llplugin"):
332327
self.path("libeay32.dll")

indra/plugins/CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,5 @@ if (WINDOWS OR DARWIN)
1313
add_subdirectory(quicktime)
1414
endif (WINDOWS OR DARWIN)
1515

16-
if (WINDOWS AND WORD_SIZE EQUAL 32)
17-
add_subdirectory(winmmshim)
18-
endif (WINDOWS AND WORD_SIZE EQUAL 32)
19-
2016
add_subdirectory(example_basic)
2117
add_subdirectory(example_media)

indra/plugins/webkit/windows_volume_catcher.cpp

+6-50
Original file line numberDiff line numberDiff line change
@@ -42,44 +42,14 @@ friend LLSingleton<VolumeCatcherImpl>;
4242
VolumeCatcherImpl();
4343
~VolumeCatcherImpl();
4444

45-
typedef void (WINAPI *set_volume_func_t)(F32);
46-
typedef void (WINAPI *set_mute_func_t)(bool);
47-
48-
set_volume_func_t mSetVolumeFunc;
49-
set_mute_func_t mSetMuteFunc;
50-
51-
// tests if running on Vista, 7, 8 + once in CTOR
52-
bool isWindowsVistaOrHigher();
53-
5445
F32 mVolume;
5546
F32 mPan;
56-
bool mSystemIsVistaOrHigher;
5747
};
5848

59-
bool VolumeCatcherImpl::isWindowsVistaOrHigher()
60-
{
61-
OSVERSIONINFO osvi;
62-
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
63-
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
64-
GetVersionEx(&osvi);
65-
return osvi.dwMajorVersion >= 6;
66-
}
67-
6849
VolumeCatcherImpl::VolumeCatcherImpl()
6950
: mVolume(1.0f), // default volume is max
7051
mPan(0.f) // default pan is centered
7152
{
72-
mSystemIsVistaOrHigher = isWindowsVistaOrHigher();
73-
74-
if ( ! mSystemIsVistaOrHigher )
75-
{
76-
HMODULE handle = ::LoadLibrary(L"winmm.dll");
77-
if(handle)
78-
{
79-
mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume");
80-
mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute");
81-
}
82-
}
8353
}
8454

8555
VolumeCatcherImpl::~VolumeCatcherImpl()
@@ -90,26 +60,12 @@ void VolumeCatcherImpl::setVolume(F32 volume)
9060
{
9161
mVolume = volume;
9262

93-
if ( mSystemIsVistaOrHigher )
94-
{
95-
// set both left/right to same volume
96-
// TODO: use pan value to set independently
97-
DWORD left_channel = (DWORD)(mVolume * 65535.0f);
98-
DWORD right_channel = (DWORD)(mVolume * 65535.0f);
99-
DWORD hw_volume = left_channel << 16 | right_channel;
100-
::waveOutSetVolume(NULL, hw_volume);
101-
}
102-
else
103-
{
104-
if (mSetMuteFunc)
105-
{
106-
mSetMuteFunc(volume == 0.f);
107-
}
108-
if (mSetVolumeFunc)
109-
{
110-
mSetVolumeFunc(mVolume);
111-
}
112-
}
63+
// set both left/right to same volume
64+
// TODO: use pan value to set independently
65+
DWORD left_channel = (DWORD)(mVolume * 65535.0f);
66+
DWORD right_channel = (DWORD)(mVolume * 65535.0f);
67+
DWORD hw_volume = left_channel << 16 | right_channel;
68+
::waveOutSetVolume(NULL, hw_volume);
11369
}
11470

11571
void VolumeCatcherImpl::setPan(F32 pan)

indra/plugins/winmmshim/CMakeLists.txt

-40
This file was deleted.

0 commit comments

Comments
 (0)