summaryrefslogtreecommitdiffstats
path: root/Gui
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-12 22:12:05 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-12 22:12:05 +0000
commit46bf7cce063a4ef1469e9381d5be27535b8e0e67 (patch)
treeaf167cad6b13020d0c447e5fe09bb3b42abae40f /Gui
parent22e0b7141e090df1bebefb941fd0455158d0fb99 (diff)
downloadmpv-46bf7cce063a4ef1469e9381d5be27535b8e0e67.tar.bz2
mpv-46bf7cce063a4ef1469e9381d5be27535b8e0e67.tar.xz
add new sumbols
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1889 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/mplayer/mw.h19
-rw-r--r--Gui/mplayer/play.c1
2 files changed, 14 insertions, 6 deletions
diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h
index 6a4d4bb581..947dd91c01 100644
--- a/Gui/mplayer/mw.h
+++ b/Gui/mplayer/mw.h
@@ -73,18 +73,17 @@ char * Translate( char * str )
case '6': t=mplShMem->LengthInSec; goto calclengthhhmmss;
case '1': t=mplShMem->TimeSec;
calclengthhhmmss:
- s=t%60; t=( t - s ) / 60; m=t%60; h=t/60;
- sprintf( tmp,"%02d:%02d:%02d",h,m,s ); strcat( trbuf,tmp );
+ sprintf( tmp,"%02d:%02d:%02d",t/3600,t/60%60,t%60 ); strcat( trbuf,tmp );
break;
case '7': t=mplShMem->LengthInSec; goto calclengthmmmmss;
case '2': t=mplShMem->TimeSec;
calclengthmmmmss:
- s=t%60; m=( ( t - s ) / 60 ) % 60;
- sprintf( tmp,"%04d:%02d",m,s ); strcat( trbuf,tmp );
+ sprintf( tmp,"%04d:%02d",t/60,t%60 ); strcat( trbuf,tmp );
break;
- case '3': sprintf( tmp,"%02d",( mplShMem->TimeSec - ( mplShMem->TimeSec % 60 ) ) / 3600 ); strcat( trbuf,tmp ); break;
- case '4': sprintf( tmp,"%02d",( ( mplShMem->TimeSec - ( mplShMem->TimeSec % 60 ) ) / 60 ) % 60 ); strcat( trbuf,tmp ); break;
+ case '3': sprintf( tmp,"%02d",mplShMem->TimeSec / 3600 ); strcat( trbuf,tmp ); break;
+ case '4': sprintf( tmp,"%02d",( ( mplShMem->TimeSec / 60 ) % 60 ) ); strcat( trbuf,tmp ); break;
case '5': sprintf( tmp,"%02d",mplShMem->TimeSec % 60 ); strcat( trbuf,tmp ); break;
+ case '8': sprintf( tmp,"%01d:%02d:%02d",mplShMem->TimeSec / 3600,( mplShMem->TimeSec / 60 ) % 60,mplShMem->TimeSec % 60 ); strcat( trbuf,tmp ); break;
case 'v': sprintf( tmp,"%3.2f%%",mplShMem->Volume ); strcat( trbuf,tmp ); break;
case 'V': sprintf( tmp,"%3.1f",mplShMem->Volume ); strcat( trbuf,tmp ); break;
case 'b': sprintf( tmp,"%3.2f%%",mplShMem->Balance ); strcat( trbuf,tmp ); break;
@@ -93,6 +92,14 @@ calclengthmmmmss:
case 's': if ( mplShMem->Playing == 0 ) strcat( trbuf,"s" ); break;
case 'l': if ( mplShMem->Playing == 1 ) strcat( trbuf,"p" ); break;
case 'e': if ( mplShMem->Playing == 2 ) strcat( trbuf,"e" ); break;
+ case 'a':
+ switch ( mplShMem->AudioType )
+ {
+ case 0: strcat( trbuf,"n" ); break;
+ case 1: strcat( trbuf,"m" ); break;
+ case 2: strcat( trbuf,"t" ); break;
+ }
+ break;
case '$': strcat( trbuf,"$" ); break;
default: continue;
}
diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c
index 1500ba90aa..0a45d3fe8a 100644
--- a/Gui/mplayer/play.c
+++ b/Gui/mplayer/play.c
@@ -50,6 +50,7 @@ void mplStop()
mplShMem->Playing=0;
mplShMem->TimeSec=0;
mplShMem->Position=0;
+ mplShMem->AudioType=0;
if ( !appMPlayer.subWindow.isFullScreen )
{
wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );