Skip to content
Snippets Groups Projects
Commit abc6aef7 authored by Richard Nelson's avatar Richard Nelson
Browse files

merge

parents 7eaae1fe 0ea9fa8d
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "volume_catcher.h" #include "volume_catcher.h"
#include <windows.h> #include <windows.h>
#include "llsingleton.h" #include "llsingleton.h"
class VolumeCatcherImpl : public LLSingleton<VolumeCatcherImpl> class VolumeCatcherImpl : public LLSingleton<VolumeCatcherImpl>
{ {
friend LLSingleton<VolumeCatcherImpl>; friend LLSingleton<VolumeCatcherImpl>;
...@@ -48,8 +47,8 @@ friend LLSingleton<VolumeCatcherImpl>; ...@@ -48,8 +47,8 @@ friend LLSingleton<VolumeCatcherImpl>;
VolumeCatcherImpl(); VolumeCatcherImpl();
~VolumeCatcherImpl(); ~VolumeCatcherImpl();
typedef void (*set_volume_func_t)(F32); typedef void (WINAPI *set_volume_func_t)(F32);
typedef void (*set_mute_func_t)(bool); typedef void (WINAPI *set_mute_func_t)(bool);
set_volume_func_t mSetVolumeFunc; set_volume_func_t mSetVolumeFunc;
set_mute_func_t mSetMuteFunc; set_mute_func_t mSetMuteFunc;
...@@ -57,7 +56,6 @@ friend LLSingleton<VolumeCatcherImpl>; ...@@ -57,7 +56,6 @@ friend LLSingleton<VolumeCatcherImpl>;
F32 mVolume; F32 mVolume;
F32 mPan; F32 mPan;
}; };
VolumeCatcherImpl::VolumeCatcherImpl() VolumeCatcherImpl::VolumeCatcherImpl()
: mVolume(1.0f), // default volume is max : mVolume(1.0f), // default volume is max
mPan(0.f) // default pan is centered mPan(0.f) // default pan is centered
...@@ -77,10 +75,8 @@ VolumeCatcherImpl::~VolumeCatcherImpl() ...@@ -77,10 +75,8 @@ VolumeCatcherImpl::~VolumeCatcherImpl()
void VolumeCatcherImpl::setVolume(F32 volume) void VolumeCatcherImpl::setVolume(F32 volume)
{ {
//F32 left_volume = volume * min(1.f, 1.f - mPan);
//F32 right_volume = volume * max(0.f, 1.f + mPan);
mVolume = volume; mVolume = volume;
if (mSetMuteFunc) if (mSetMuteFunc)
{ {
mSetMuteFunc(volume == 0.f); mSetMuteFunc(volume == 0.f);
...@@ -123,3 +119,4 @@ void VolumeCatcher::pump() ...@@ -123,3 +119,4 @@ void VolumeCatcher::pump()
// No periodic tasks are necessary for this implementation. // No periodic tasks are necessary for this implementation.
} }
...@@ -120,8 +120,8 @@ extern "C" ...@@ -120,8 +120,8 @@ extern "C"
{ // zero out the audio buffer when muted { // zero out the audio buffer when muted
memset(pwh->lpData, 0, pwh->dwBufferLength); memset(pwh->lpData, 0, pwh->dwBufferLength);
} }
else else if (sVolumeLevel != 1.f)
{ { // need to apply volume level
wave_out_map_t::iterator found_it = sWaveOuts.find(hwo); wave_out_map_t::iterator found_it = sWaveOuts.find(hwo);
if (found_it != sWaveOuts.end()) if (found_it != sWaveOuts.end())
{ {
...@@ -163,10 +163,11 @@ extern "C" ...@@ -163,10 +163,11 @@ extern "C"
// the captain has turned off the MMX sign, you are now free to use floating point registers // the captain has turned off the MMX sign, you are now free to use floating point registers
_mm_empty(); _mm_empty();
// finish remaining samples that didn't fit into 64 bit register
for (short* sample_16 = (short*)sample_64; for (short* sample_16 = (short*)sample_64;
sample_16 < (short*)(pwh->lpData + pwh->dwBufferLength); sample_16 < (short*)(pwh->lpData + pwh->dwBufferLength);
++sample_16) ++sample_16)
{ // finish remaining samples that didn't fit into 64 bit register {
*sample_16 = (*sample_16 * volume_16) >> 15; *sample_16 = (*sample_16 * volume_16) >> 15;
} }
......
...@@ -1588,7 +1588,10 @@ if (WINDOWS) ...@@ -1588,7 +1588,10 @@ if (WINDOWS)
--login_channel=${VIEWER_LOGIN_CHANNEL} --login_channel=${VIEWER_LOGIN_CHANNEL}
--source=${CMAKE_CURRENT_SOURCE_DIR} --source=${CMAKE_CURRENT_SOURCE_DIR}
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat
DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py DEPENDS
${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
${COPY_INPUT_DEPENDENCIES}
) )
add_custom_target(package ALL DEPENDS add_custom_target(package ALL DEPENDS
......
...@@ -13,7 +13,7 @@ top="600" ...@@ -13,7 +13,7 @@ top="600"
</panel.string> </panel.string>
<panel.string <panel.string
name="real_url" translate="false"> name="real_url" translate="false">
http://secondlife.com/app/login/ http://www.yahoo.com/
</panel.string> </panel.string>
<string name="reg_in_client_url" translate="false"> <string name="reg_in_client_url" translate="false">
http://secondlife.eniac15.lindenlab.com/reg-in-client/ http://secondlife.eniac15.lindenlab.com/reg-in-client/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment