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 @@ ...@@ -69,14 +69,14 @@
<key>Name</key> <key>Name</key>
<string>volumeUp</string> <string>volumeUp</string>
<key>Description</key> <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> </dict>
<key>volumeDown</key> <key>volumeDown</key>
<dict> <dict>
<key>Name</key> <key>Name</key>
<string>volumeDown</string> <string>volumeDown</string>
<key>Description</key> <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> </dict>
</dict> </dict>
......
...@@ -1896,8 +1896,8 @@ static void MacroDo( httpd_file_sys_t *p_args, ...@@ -1896,8 +1896,8 @@ static void MacroDo( httpd_file_sys_t *p_args,
if( strstr(vol, "%") != NULL ) if( strstr(vol, "%") != NULL )
{ {
i_value = atoi( vol ); i_value = atoi( vol );
if( (i_value <= 100) && (i_value>=0) ){ if( (i_value <= 400) && (i_value>=0) ){
aout_VolumeSet( p_intf, (i_value * (AOUT_VOLUME_MAX - AOUT_VOLUME_MIN))/100+AOUT_VOLUME_MIN); 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 )); msg_Dbg( p_intf, "requested volume set: %i%%", atoi( vol ));
} }
} else } else
......
...@@ -991,7 +991,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -991,7 +991,7 @@ static VLCMain *_o_sharedMainInstance = nil;
if( p_intf->p_sys->b_volume_update ) if( p_intf->p_sys->b_volume_update )
{ {
NSString *o_text; 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 ) if( i_lastShownVolume != -1 )
[self setScrollField:o_text stopAfter:1000000]; [self setScrollField:o_text stopAfter:1000000];
......
...@@ -241,7 +241,7 @@ function changeMe(item) ...@@ -241,7 +241,7 @@ function changeMe(item)
if ( seconds < 10 ) seconds = "0" + seconds; if ( seconds < 10 ) seconds = "0" + seconds;
document.getElementById('length').innerHTML = hours+":"+minutes+":"+seconds; document.getElementById('length').innerHTML = hours+":"+minutes+":"+seconds;
got_volume = <vlc id="value" param1="volume" />; 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> </script>
</body> </body>
</html> </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