xboxscene.org forums

Author Topic: Thc Lite Remember Player Volume  (Read 714 times)

Jezz_X

  • Archived User
  • Hero Member
  • *
  • Posts: 2893
Thc Lite Remember Player Volume
« on: August 09, 2004, 10:55:00 AM »

CODE
function UpdateVolumeOnScreen()

make it look like
CODE
function UpdateVolumeOnScreen()
{
   var a = Math.round(theMusicPlayer.volume * 100);
   theInLine.theModeNameText.text = "vol: " + a;
   var info = new Settings;
   info.file = "X:\\Playlists\\PlaylistInfo.xbx";
   info.SetValue("Music Volume", theMusicPlayer.volume);
}


find

CODE
function MusicPlayerStart()
{
   InitializeMusicPlayerValues();
   var info = new Settings;
   info.file = "X:\\config.xbx";
   var a = info.GetValue("Background Music");
   if(a == "Yes")
   {
 BGMon = true;
   }


make it look like this

CODE
function MusicPlayerStart()
{
   InitializeMusicPlayerValues();
   var info = new Settings;
   info.file = "X:\\config.xbx";
   var a = info.GetValue("Background Music");
   var info = new Settings;
   info.file = "X:\\Playlists\\PlaylistInfo.xbx";
               theMusicPlayer.volume = info.GetValue("Music Volume");
   if(a == "Yes")
   {
 BGMon = true;
   }


The dash will now save your current volume for next time you start it

note : the first time you run it your volume will be 0
Logged

Sheriff

  • Archived User
  • Full Member
  • *
  • Posts: 140
Thc Lite Remember Player Volume
« Reply #1 on: August 09, 2004, 11:44:00 AM »

biggrin.gif
Thanks alot!

Sheriff
Logged

Jezz_X

  • Archived User
  • Hero Member
  • *
  • Posts: 2893
Thc Lite Remember Player Volume
« Reply #2 on: August 09, 2004, 06:30:00 PM »

Ok heres a little update thats a little more cpu friendly
don't change anything in

CODE
function UpdateVolumeOnScreen()

make it look like the original if you allready have
CODE

function UpdateVolumeOnScreen()
{
var a = Math.round(theMusicPlayer.volume * 100);
theInLine.theModeNameText.text = "vol: " + a;
}


Now go and find function OnRightUp() in DEF theMainControlPanelJoy Joystick and change it to this

CODE
   function OnRightUp()
   {
  RightTrigger = false;
  UpdateModeText();
  var info = new Settings;
  info.file = "X:\\Playlists\\PlaylistInfo.xbx";
  info.SetValue("Music Volume", theMusicPlayer.volume);

   }


This way the new volume will only get saved after you release the right trigger to get out of volume mode instead of every time you press up or down
Logged

rrbroadband

  • Archived User
  • Newbie
  • *
  • Posts: 3
Thc Lite Remember Player Volume
« Reply #3 on: August 09, 2004, 07:36:00 PM »

QUOTE (Jezz_X @ Aug 10 2004, 01:30 AM)
Ok heres a little update thats a little more cpu friendly
don't change anything in

CODE
function UpdateVolumeOnScreen()

make it look like the original if you allready have
CODE

function UpdateVolumeOnScreen()
{
var a = Math.round(theMusicPlayer.volume * 100);
theInLine.theModeNameText.text = "vol: " + a;
}


Now go and find function OnRightUp() in DEF theMainControlPanelJoy Joystick and change it to this

CODE
   function OnRightUp()
   {
  RightTrigger = false;
  UpdateModeText();
  var info = new Settings;
  info.file = "X:\\Playlists\\PlaylistInfo.xbx";
  info.SetValue("Music Volume", theMusicPlayer.volume);

   }


This way the new volume will only get saved after you release the right trigger to get out of volume mode instead of every time you press up or down

 something is wrong buddie i did what u said and nothing happens nothing saves.
 it boots up will full volume at 100 all the time =(
Logged

Jezz_X

  • Archived User
  • Hero Member
  • *
  • Posts: 2893
Thc Lite Remember Player Volume
« Reply #4 on: August 09, 2004, 07:14:00 PM »

CODE
function MusicPlayerStart()
{
InitializeMusicPlayerValues();
var info = new Settings;
info.file = "X:\\config.xbx";
var a = info.GetValue("Background Music");
if(a == "Yes")
{
BGMon = true;
}


make it look like

CODE
function MusicPlayerStart()
{
InitializeMusicPlayerValues();
var info = new Settings;
info.file = "X:\\config.xbx";
var a = info.GetValue("Background Music");
var info = new Settings;
info.file = "X:\\Playlists\\PlaylistInfo.xbx";
              theMusicPlayer.volume = info.GetValue("Music Volume");
if(a == "Yes")
{
BGMon = true;
}


Now go and find function OnRightUp() in DEF theMainControlPanelJoy Joystick and change it to this

CODE
function OnRightUp()
{
RightTrigger = false;
UpdateModeText();
var info = new Settings;
info.file = "X:\\Playlists\\PlaylistInfo.xbx";
info.SetValue("Music Volume", theMusicPlayer.volume);

}
Logged

rrbroadband

  • Archived User
  • Newbie
  • *
  • Posts: 3
Thc Lite Remember Player Volume
« Reply #5 on: August 09, 2004, 09:15:00 PM »

QUOTE (Jezz_X @ Aug 10 2004, 03:17 AM)
You need to do the last too in the first post as well

so find

CODE
function MusicPlayerStart()
{
InitializeMusicPlayerValues();
var info = new Settings;
info.file = "X:\\config.xbx";
var a = info.GetValue("Background Music");
if(a == "Yes")
{
 BGMon = true;
}


make it look like

CODE
function MusicPlayerStart()
{
InitializeMusicPlayerValues();
var info = new Settings;
info.file = "X:\\config.xbx";
var a = info.GetValue("Background Music");
var info = new Settings;
info.file = "X:\\Playlists\\PlaylistInfo.xbx";
               theMusicPlayer.volume = info.GetValue("Music Volume");
if(a == "Yes")
{
 BGMon = true;
}


Now go and find function OnRightUp() in DEF theMainControlPanelJoy Joystick and change it to this

CODE
function OnRightUp()
{
 RightTrigger = false;
 UpdateModeText();
 var info = new Settings;
 info.file = "X:\\Playlists\\PlaylistInfo.xbx";
 info.SetValue("Music Volume", theMusicPlayer.volume);

}

 i did but still aint dont work =(
Logged

rrbroadband

  • Archived User
  • Newbie
  • *
  • Posts: 3
Thc Lite Remember Player Volume
« Reply #6 on: August 09, 2004, 10:19:00 PM »

got it working it's great man thanx alot =)
Logged