diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-08-21 20:44:29 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-08-21 20:44:29 +0000 |
commit | 0f4a3c14c3774acb3cca332f530a96385617278a (patch) | |
tree | d3aa1485079e4bbb59abe64d5106f7aed6f43b2e /mplayer.c | |
parent | 665b40cbd553bc620d9ecf3b2c7efdffbafd87fb (diff) | |
download | mpv-0f4a3c14c3774acb3cca332f530a96385617278a.tar.bz2 mpv-0f4a3c14c3774acb3cca332f530a96385617278a.tar.xz |
new slave volume command done :
"volume <x> <abs 0|1>"
where :
abs optionnal,
0 : relative, x > 0 increase else decrease
1 : static, x = volume, 0 to 100
for sofware plugin, remember to / 2.55 before commiting
patch by "j.a.l" <j.a.l@free.fr>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7056 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -2380,10 +2380,20 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) } break; case MP_CMD_VOLUME : { int v = cmd->args[0].v.i; + + // start change for absolute volume value + int abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0; + + if( abs ) + { + mixer_setvolume( (float)v, (float)v ); + } else { if(v > 0) mixer_incvolume(); else mixer_decvolume(); + } + #ifdef USE_OSD if(osd_level){ osd_visible=sh_video->fps; // 1 sec |