diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-20 12:41:00 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-20 12:41:00 +0100 |
commit | f33fff7e15947859f9c89cd5297971a28205bca8 (patch) | |
tree | 4abe6618d6bc69432707f23369587190d1ef544d /indra/media_plugins/webkit/windows_volume_catcher.cpp | |
parent | e275b7a658ee29ca4ce3dd77908ddd4c34749449 (diff) | |
parent | 5952fbca316ba1d1e4243bf5ebd6dc647e4957f4 (diff) |
slightly hairy merge from viewer-trunk
Diffstat (limited to 'indra/media_plugins/webkit/windows_volume_catcher.cpp')
-rw-r--r-- | indra/media_plugins/webkit/windows_volume_catcher.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/indra/media_plugins/webkit/windows_volume_catcher.cpp b/indra/media_plugins/webkit/windows_volume_catcher.cpp index 1c1ef0b42f..8debe8fac6 100644 --- a/indra/media_plugins/webkit/windows_volume_catcher.cpp +++ b/indra/media_plugins/webkit/windows_volume_catcher.cpp @@ -232,14 +232,22 @@ VolumeCatcherImpl::VolumeCatcherImpl() : mVolume(1.0f), // default volume is max mPan(0.f) // default pan is centered { - // for each reported mixer "device", create a proxy object and add to list - U32 num_mixers = mixerGetNumDevs(); - for (U32 mixer_index = 0; mixer_index < num_mixers; ++mixer_index) + OSVERSIONINFOEX V = {sizeof(OSVERSIONINFOEX)}; //EX for NT 5.0 and later + + ::GetVersionEx((POSVERSIONINFO)&V); + + // disable volume on XP and below + if (V.dwPlatformId == VER_PLATFORM_WIN32_NT && V.dwMajorVersion >= 6) { - Mixer* mixerp = Mixer::create(mixer_index); - if (mixerp) + // for each reported mixer "device", create a proxy object and add to list + U32 num_mixers = mixerGetNumDevs(); + for (U32 mixer_index = 0; mixer_index < num_mixers; ++mixer_index) { - mMixers.push_back(mixerp); + Mixer* mixerp = Mixer::create(mixer_index); + if (mixerp) + { + mMixers.push_back(mixerp); + } } } } @@ -279,6 +287,7 @@ void VolumeCatcherImpl::setVolume(F32 volume) } } + mVolume = volume; } |