Commit 2b07c366 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Change volume range to 0-400 % visually in the macosx and web interfaces. At...

* Change volume range to 0-400 % visually in the macosx and web interfaces. At least now we represent what is actually going on. refs #250
parent b648e677
......@@ -69,14 +69,14 @@
<key>Name</key>
<string>volumeUp</string>
<key>Description</key>
<string>Bring the volume up by one step. There are 32 steps from 0 to 100% volume.</string>
<string>Bring the volume up by one step. There are 32 steps from 0 to 400% volume.</string>
</dict>
<key>volumeDown</key>
<dict>
<key>Name</key>
<string>volumeDown</string>
<key>Description</key>
<string>Bring the volume down by one step. There are 32 steps from 0 to 100% volume.</string>
<string>Bring the volume down by one step. There are 32 steps from 0 to 400% volume.</string>
</dict>
</dict>
</dict>
......
......@@ -1896,8 +1896,8 @@ static void MacroDo( httpd_file_sys_t *p_args,
if( strstr(vol, "%") != NULL )
{
i_value = atoi( vol );
if( (i_value <= 100) && (i_value>=0) ){
aout_VolumeSet( p_intf, (i_value * (AOUT_VOLUME_MAX - AOUT_VOLUME_MIN))/100+AOUT_VOLUME_MIN);
if( (i_value <= 400) && (i_value>=0) ){
aout_VolumeSet( p_intf, (i_value * (AOUT_VOLUME_MAX - AOUT_VOLUME_MIN))/400+AOUT_VOLUME_MIN);
msg_Dbg( p_intf, "requested volume set: %i%%", atoi( vol ));
}
} else
......
......@@ -991,7 +991,7 @@ static VLCMain *_o_sharedMainInstance = nil;
if( p_intf->p_sys->b_volume_update )
{
NSString *o_text;
o_text = [NSString stringWithFormat: _NS("Volume: %d"), i_lastShownVolume * 200 / AOUT_VOLUME_MAX];
o_text = [NSString stringWithFormat: _NS("Volume: %d%%"), i_lastShownVolume * 400 / AOUT_VOLUME_MAX];
if( i_lastShownVolume != -1 )
[self setScrollField:o_text stopAfter:1000000];
......
......@@ -241,7 +241,7 @@ function changeMe(item)
if ( seconds < 10 ) seconds = "0" + seconds;
document.getElementById('length').innerHTML = hours+":"+minutes+":"+seconds;
got_volume = <vlc id="value" param1="volume" />;
document.getElementById( 'volume').innerHTML = Math.ceil(got_volume * 100/1024) + " %";
document.getElementById( 'volume').innerHTML = Math.ceil(got_volume * 400/1024) + " %";
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment