diff options
| -rw-r--r-- | indra/llaudio/llaudiodecodemgr.cpp | 18 | ||||
| -rw-r--r-- | indra/newview/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | indra/newview/llstatusbar.cpp | 22 | ||||
| -rw-r--r-- | indra/newview/llstatusbar.h | 3 | ||||
| -rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_status_bar.xml | 11 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_volume_pulldown.xml | 32 | 
7 files changed, 75 insertions, 16 deletions
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index ca0a665a97..ae959eaa81 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -68,7 +68,6 @@ public:  		~WriteResponder() {}  		void completed(S32 bytes)  		{ -			llinfos << "vorbis decoder COMPLETED callback with " << bytes << llendl;  			mDecoder->ioComplete(bytes);  		}  		LLPointer<LLVorbisDecodeState> mDecoder; @@ -203,7 +202,7 @@ BOOL LLVorbisDecodeState::initDecode()  	vfs_callbacks.close_func = vfs_close;  	vfs_callbacks.tell_func = vfs_tell; -	llinfos << "Initing decode from vfile: " << mUUID << llendl; +	//llinfos << "Initing decode from vfile: " << mUUID << llendl;  	mInFilep = new LLVFile(gVFS, mUUID, LLAssetType::AT_SOUND);  	if (!mInFilep || !mInFilep->getSize()) @@ -356,14 +355,13 @@ BOOL LLVorbisDecodeState::decodeSection()  	}  	if (mDone)  	{ - 		llwarns << mOutFilename << " Already done with vorbis decode, aborting!" << llendl; +// 		llwarns << "Already done with decode, aborting!" << llendl;  		return TRUE;  	}  	char pcmout[4096];	/*Flawfinder: ignore*/  	BOOL eof = FALSE;  	long ret=ov_read(&mVF, pcmout, sizeof(pcmout), 0, 2, 1, &mCurrentSection); -	llinfos << mOutFilename << " vorbis decode returned " << ret << llendl;  	if (ret == 0)  	{  		/* EOF */ @@ -403,10 +401,9 @@ BOOL LLVorbisDecodeState::finishDecode()  	}  #if !defined(USE_WAV_VFILE)	 -	if (mFileHandle == LLLFSThread::nullHandle()) // haven't started to write to disk yet... +	if (mFileHandle == LLLFSThread::nullHandle())  #endif  	{ -		llwarns << "mFileHandle is still null in vorbis decode for " << getUUID() << llendl;  		ov_clear(&mVF);  		// write "data" chunk length, in little-endian format @@ -478,10 +475,7 @@ BOOL LLVorbisDecodeState::finishDecode()  			mValid = FALSE;  			return TRUE; // we've finished  		} -  #if !defined(USE_WAV_VFILE) -		// start the write of the wav file to disk. -		llwarns << "starting wav write to disk from vorbis decode " << mOutFilename << llendl;  		mBytesRead = -1;  		mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, mWAVBuffer.size(),  							 new WriteResponder(this)); @@ -501,7 +495,6 @@ BOOL LLVorbisDecodeState::finishDecode()  		}  		else  		{ -			llwarns << "claiming to not be done in finishDecode" << llendl;  			return FALSE; // not done  		}  	} @@ -509,11 +502,11 @@ BOOL LLVorbisDecodeState::finishDecode()  	mDone = TRUE;  #if defined(USE_WAV_VFILE) -	// write the data into the VFS. +	// write the data.  	LLVFile output(gVFS, mUUID, LLAssetType::AT_SOUND_WAV);  	output.write(&mWAVBuffer[0], mWAVBuffer.size());  #endif -	llinfos << "Finished decode for " << getUUID() << llendl; +	//llinfos << "Finished decode for " << getUUID() << llendl;  	return TRUE;  } @@ -560,7 +553,6 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)  			// Decode in a loop until we're done or have run out of time.  			while(!(res = mCurrentDecodep->decodeSection()) && (decode_timer.getElapsedTimeF32() < num_secs))  			{ -		llinfos << "vorbis/audio decode timer has " << decode_timer.getElapsedTimeF32() << "s elapsed, from an alottment of " << num_secs << "s" << llendl;  				// decodeSection does all of the work above  			} diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e632cbaaf2..be60cecb3f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -185,7 +185,7 @@ set(viewer_SOURCE_FILES      llfloatermediasettings.cpp      llfloatermemleak.cpp      llfloaternamedesc.cpp -        llfloaternearbymedia.cpp +    llfloaternearbymedia.cpp      llfloaternotificationsconsole.cpp      llfloateropenobject.cpp      llfloaterparcel.cpp @@ -212,6 +212,7 @@ set(viewer_SOURCE_FILES      llfloaterurldisplay.cpp      llfloaterurlentry.cpp      llfloatervoicedevicesettings.cpp +    llfloatervolumepulldown.cpp      llfloaterwater.cpp      llfloaterwhitelistentry.cpp      llfloaterwindlight.cpp diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index dc22a243eb..6074bb2be9 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -42,6 +42,7 @@  #include "llfloaterbuycurrency.h"  #include "llfloaterchat.h"  #include "llfloaterlagmeter.h" +#include "llfloatervolumepulldown.h"  #include "llfloaterregioninfo.h"  #include "llfloaterscriptdebug.h"  #include "llhudicon.h" @@ -125,6 +126,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect)  	mSGPacketLoss(NULL),  	mBtnBuyCurrency(NULL),  	mBtnVolume(NULL), +	mPanelVolume(NULL),  	mBalance(0),  	mHealth(100),  	mSquareMetersCredit(0), @@ -160,6 +162,8 @@ LLStatusBar::LLStatusBar(const LLRect& rect)  	mBtnVolume = getChild<LLButton>( "volume_btn" );  	mBtnVolume->setClickedCallback( onClickVolume, this ); +	mPanelVolume = getChild<LLPanel>( "volume_pulldown" ); +  	gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2));  	childSetAction("scriptout", onClickScriptDebug, this); @@ -203,7 +207,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect)  	addChild(mSGPacketLoss);  	childSetActionTextbox("stat_btn", onClickStatGraph); -  }  LLStatusBar::~LLStatusBar() @@ -511,6 +514,23 @@ static void onClickVolume(void* data)  	// toggle the master mute setting  	BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio");  	gSavedSettings.setBOOL("MuteAudio", !mute_audio); +	 +	// toggle the master volume pull-down + +	//LLFloaterReg::showInstance("volume_pulldown"); //tmp +	//LLPanelVolumePulldown *foo= +		//new LLPanelVolumePulldown(); +	//LLPanel* container = getRootView();//->getChild<LLPanel>("nav_bar_container"); +	//container->addChild(foo); +	LLStatusBar *sb = (LLStatusBar*)(data); +	llassert_always(sb); +	sb->mPanelVolume->setRect(LLRect(1,1,100,100)); +	sb->mPanelVolume->setShape(LLRect(1,1,100,100)); +	sb->mPanelVolume->setBackgroundColor(LLColor3(1.0, 0.0, 0.0)); +	sb->mPanelVolume->setVisible(TRUE); +	sb->mPanelVolume->setEnabled(TRUE); +	gFocusMgr.setTopCtrl(sb->mPanelVolume); +	// also set focus explicitly to mpanelvolume  }  // sets the static variables necessary for the date diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index bdaacce981..7be119dd4d 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -86,6 +86,8 @@ public:  	S32 getSquareMetersCommitted() const;  	S32 getSquareMetersLeft() const; +	LLPanel         *mPanelVolume;	 +  private:  	// simple method to setup the part that holds the date  	void setupDate(); @@ -93,7 +95,6 @@ private:  	void onVolumeChanged(const LLSD& newvalue);  	static void onClickStatGraph(void* data); -	  private:  	LLTextBox	*mTextHealth; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 642df92379..1f735d6dfb 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -105,6 +105,7 @@  #include "llfloateruipreview.h"  #include "llfloaterurldisplay.h"  #include "llfloatervoicedevicesettings.h" +#include "llfloatervolumepulldown.h"  #include "llfloaterwater.h"  #include "llfloaterwhitelistentry.h"  #include "llfloaterwindlight.h" @@ -247,6 +248,7 @@ void LLViewerFloaterReg::registerFloaters()  	LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterImagePreview>, "upload");  	LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload"); +	LLFloaterReg::add("volume_pulldown", "floater_volume_pulldown.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVolumePulldown>);  	LLFloaterReg::add("voice_call", "floater_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCall>);  	LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>);	 diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 65bc48265d..a296795aed 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -81,6 +81,17 @@       name="volume_btn"       tool_tip="Global Volume Control"       width="16" /> +    <panel +     class="panel_volume_pulldown" +     filename="panel_volume_pulldown.xml" +     follows="all" +     height="533" +     layout="topleft" +     left="0" +     name="volume_pulldown" +     top="5" +     visible="false" +     width="313" />      <text       enabled="true"       follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml new file mode 100644 index 0000000000..8c12fd1fb4 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel +   chrome="true" +   border="false" +   follows="all" +   height="50" +   label="xSounds" +   layout="topleft" +   left="1" +   name="xPreference Media panel" +   top="1" +   width="150"> +    <slider +     control_name="AudioLevelMaster" +     follows="left|top" +     font.style="BOLD" +     height="15" +     increment="0.05" +     initial_value="0.5" +     layout="topleft" +     left="0" +     name="System Volume" +     show_text="false" +     slider_label.halign="right" +     top_pad="5" +     volume="true" +     width="120"> +        <slider.commit_callback +         function="Vol.setControlFalse" +         parameter="MuteAudio" /> +    </slider> +</panel>  | 
