Old 6th January 2019, 18:41   #1
ariszlo
Senior Member
 
Join Date: Jun 2015
Location: Hungary
Posts: 471
volumebyregion & volumeknob drop volume

The attached skin calls volumebyregion.maki in main mode and volumeknob.maki in shade mode. When I switch to this skin, the volume drops. Also, if I start Winamp with this skin, the volume starts low.

What causes this drop and how can it be fixed?
Attached Files
File Type: wal Venom-2019.wal (974.5 KB, 40 views)

BREAKING NEWS: Big Bento Modern v1.13 and Quinto Black CT v2.6 released!
ariszlo is online now   Reply With Quote
Old 6th January 2019, 19:59   #2
PeterK.
Quinto Black CT Developer
 
Join Date: Sep 2016
Posts: 589
Quote:
Originally Posted by ariszlo View Post
...When I switch to this skin, the volume drops. Also, if I start Winamp with this skin, the volume starts low...
I cannot reproduce your issues - volume is fine while switching to shade mode and back or starting with this skin, which, by the way, would look really great on a high-res display if it was twice as big.
PeterK. is offline   Reply With Quote
Old 6th January 2019, 20:42   #3
ariszlo
Senior Member
 
Join Date: Jun 2015
Location: Hungary
Posts: 471
Quote:
Originally Posted by PeterK. View Post
I cannot reproduce your issues - volume is fine while switching to shade mode and back or starting with this skin...
Then you probably keep the volume low. Try this: raise the volume up to 50% in Quinto then switch to Venom. The volume should go down to about 25%.

Quote:
Originally Posted by PeterK. View Post
...which, by the way, would look really great on a high-res display if it was twice as big.
Yes, I know. All old skins are small. But some are even smaller.

BREAKING NEWS: Big Bento Modern v1.13 and Quinto Black CT v2.6 released!
ariszlo is online now   Reply With Quote
Old 6th January 2019, 20:48   #4
PeterK.
Quinto Black CT Developer
 
Join Date: Sep 2016
Posts: 589
Quinto's volume at 100 % and switched to Venom. Also 100 %.

Attached Thumbnails
Click image for larger version

Name:	volume.png
Views:	163
Size:	122.7 KB
ID:	54306  
PeterK. is offline   Reply With Quote
Old 6th January 2019, 21:20   #5
ariszlo
Senior Member
 
Join Date: Jun 2015
Location: Hungary
Posts: 471
Thanks for testing it. Then it is probably some weird, hardware related issue.

BREAKING NEWS: Big Bento Modern v1.13 and Quinto Black CT v2.6 released!
ariszlo is online now   Reply With Quote
Old 7th January 2019, 20:02   #6
Victhor
Late skinner & Moderator
 
Victhor's Avatar
 
Join Date: May 2003
Location: Argentina
Posts: 1,583
I'm seeing this issue too, is not just you Ariszlo.
Victhor is offline   Reply With Quote
Old 7th January 2019, 21:27   #7
ariszlo
Senior Member
 
Join Date: Jun 2015
Location: Hungary
Posts: 471
Thanks, Victhor!

Meanwhile, I have found the culprit. If I comment this out in player-normal.xml then Venom will properly keep the volume level:

PHP Code:
<script id="electricity" file="scripts/electricity.maki"/> 
So editing electricity.m might fix the issue.

BREAKING NEWS: Big Bento Modern v1.13 and Quinto Black CT v2.6 released!
ariszlo is online now   Reply With Quote
Old 8th January 2019, 14:05   #8
ariszlo
Senior Member
 
Join Date: Jun 2015
Location: Hungary
Posts: 471
This is what electricity.maki does:

If the boost button is pressed then the volume is raised to 255 (= 100%).
If it is unpressed then it is lowered to 50 (= 20%).

How do you modifiy the script to
  1. not change the volume level if switching to Venom from another skin,
  2. remember what the volume level was before toggling boost on,
  3. restore the original volume level when toggling boost off?
In other words, how do you make it true what the skin's author says?
Quote:
Originally Posted by QuadHeliX View Post
The skin just remembers the volume where it was left at before boost.

BREAKING NEWS: Big Bento Modern v1.13 and Quinto Black CT v2.6 released!
ariszlo is online now   Reply With Quote
Old 9th January 2019, 13:46   #9
ariszlo
Senior Member
 
Join Date: Jun 2015
Location: Hungary
Posts: 471
Getting there. Below is how I edited electricity.m. Now, if I toggle boost on then volume goes up to 100% as expected. If I toggle it off then it returns to the original level. So far so good. If I switch skins or quit Winamp while boost is off then volume is preserved fine. However, if I switch skins or quit Winamp while boost is on then the boost level (= 100%) is saved, not the original level.

What do I need to add to the script to toggle boost of before switching skins or quitting Winamp?

PHP Code:
#include "../../../lib/std.mi"

Global ToggleButton mytoggleboost;
Global 
AnimatedLayer animlayer;
Global 
Boolean elecstatusbooststatus;
Global 
Group stdgrp;
Global 
Int oldvol// added
Global Int olpreamp// added

System.onScriptLoaded()
{
    
stdgrp=getScriptGroup();

    
oldvol system.getVolume(); // added
    
olpreamp system.getEqPreamp(); // added

    
mytoggle=stdgrp.findObject("mytoggle");
    
boost=stdgrp.findObject("boost");
    
animlayer=stdgrp.findObject("animatedlayer");

    
booststatus getPrivateInt("Venom","toggle_boost",0);
    
boost.setActivated(booststatus);
    
boost.onToggle(booststatus);

    
elecstatus getPrivateInt("Venom","toggle_electricity",0);
    
mytoggle.setActivated(elecstatus);
    
mytoggle.onToggle(elecstatus);
}

mytoggle.onToggle(Boolean t)
{
    
setPrivateInt("Venom","toggle_electricity",t);

    if(
t){
        
animlayer.play();
    }else{
        
animlayer.stop();
        
animlayer.gotoFrame(0);
    }
}

boost.onToggle(Boolean t)
{
    
setPrivateInt("Venom","toggle_boost",t);

    if(
t){
        
//setPrivateInt("Venom","old_volume",getVolume());
        //setPrivateInt("Venom","old_preamp",getEqPreamp());
        
setVolume(255);
        
setEqPreamp(127);
        
animlayer.play();
    }else{
        if(!
mytoggle.getActivated()){
            
animlayer.stop();
            
animlayer.gotoFrame(0);
        }
        
//setVolume(getPrivateInt("Venom","old_volume",50));
        //setEqPreamp(getPrivateInt("Venom","old_preamp",0));        
        
system.setVolume(oldvol);
        
system.setEqPreamp(olpreamp);
    }


BREAKING NEWS: Big Bento Modern v1.13 and Quinto Black CT v2.6 released!
ariszlo is online now   Reply With Quote
Old 9th January 2019, 22:29   #10
ariszlo
Senior Member
 
Join Date: Jun 2015
Location: Hungary
Posts: 471
Rereading electricity.m, I realized that the script does what is written in it so the volume drop is not a bug but a feature.

BREAKING NEWS: Big Bento Modern v1.13 and Quinto Black CT v2.6 released!
ariszlo is online now   Reply With Quote
Old 10th January 2019, 08:58   #11
ariszlo
Senior Member
 
Join Date: Jun 2015
Location: Hungary
Posts: 471
Quote:
Originally Posted by ariszlo View Post
What do I need to add to the script to toggle boost of before switching skins or quitting Winamp?
Even though I am not going to fix what is not broken and leave electricity.m as it is, I am really curious to know if it is possible to automatically toggle off a button when closing Winamp or switching to another skin.

BREAKING NEWS: Big Bento Modern v1.13 and Quinto Black CT v2.6 released!
ariszlo is online now   Reply With Quote
Old 8th February 2019, 01:33   #12
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,332
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
save it to the global - and re-use on maki as a base set for the vol and setting.

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump