Mercurial > mplayer.hg
changeset 12691:0230544f52a1
Fix GUI compilation, patch by Reimar Dffinger and Alexander Strasser.
author | diego |
---|---|
date | Sat, 26 Jun 2004 13:26:11 +0000 |
parents | bc34137bb0b0 |
children | 797e602bf1dd |
files | Gui/interface.c Gui/mplayer/common.c Gui/mplayer/gtk/menu.c Gui/mplayer/gtk/opts.c Gui/mplayer/mw.c mplayer.c |
diffstat | 6 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/interface.c Sat Jun 26 13:24:01 2004 +0000 +++ b/Gui/interface.c Sat Jun 26 13:26:11 2004 +0000 @@ -42,6 +42,8 @@ #include "../m_config.h" #include "../m_option.h" +extern mixer_t mixer; // mixer from mplayer.c + guiInterface_t guiIntfStruct; int guiWinID=-1; @@ -622,7 +624,7 @@ if ( audio_out ) { float l,r; - mixer_getvolume( &l,&r ); + mixer_getvolume( &mixer,&l,&r ); guiIntfStruct.Volume=(r>l?r:l); if ( r != l ) guiIntfStruct.Balance=( ( r - l ) + 100 ) * 0.5f; else guiIntfStruct.Balance=50.0f; @@ -651,7 +653,7 @@ if ( audio_out ) { float l,r; - mixer_getvolume( &l,&r ); + mixer_getvolume( &mixer,&l,&r ); guiIntfStruct.Volume=(r>l?r:l); if ( r != l ) guiIntfStruct.Balance=( ( r - l ) + 100 ) * 0.5f; else guiIntfStruct.Balance=50.0f;
--- a/Gui/mplayer/common.c Sat Jun 26 13:24:01 2004 +0000 +++ b/Gui/mplayer/common.c Sat Jun 26 13:26:11 2004 +0000 @@ -30,6 +30,8 @@ #include "play.h" #include "widgets.h" +extern mixer_t mixer; // mixer from mplayer.c + extern unsigned int GetTimerMS( void ); inline void TranslateFilename( int c,char * tmp,size_t tmplen ) @@ -143,7 +145,7 @@ case 'l': if ( guiIntfStruct.Playing == 1 ) strlcat( trbuf,"p",sizeof( trbuf ) ); break; case 'e': if ( guiIntfStruct.Playing == 2 ) strlcat( trbuf,"e",sizeof( trbuf ) ); break; case 'a': - if ( muted ) { strlcat( trbuf,"n",sizeof( trbuf ) ); break; } + if ( mixer.muted ) { strlcat( trbuf,"n",sizeof( trbuf ) ); break; } switch ( guiIntfStruct.AudioType ) { case 0: strlcat( trbuf,"n",sizeof( trbuf ) ); break;
--- a/Gui/mplayer/gtk/menu.c Sat Jun 26 13:24:01 2004 +0000 +++ b/Gui/mplayer/gtk/menu.c Sat Jun 26 13:26:11 2004 +0000 @@ -17,6 +17,8 @@ #include "../../../libmpdemux/stream.h" #include "../../../libmpdemux/demuxer.h" +extern mixer_t mixer; // mixer from mplayer.c + void ActivateMenuItem( int Item ) { // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 ); @@ -462,7 +464,7 @@ } AddSeparator( Menu ); - MenuItem=AddMenuCheckItem( Menu,MSGTR_MENU_Mute,muted,evMute ); + MenuItem=AddMenuCheckItem( Menu,MSGTR_MENU_Mute,mixer.muted,evMute ); if ( !guiIntfStruct.AudioType ) gtk_widget_set_sensitive( MenuItem,FALSE ); AddMenuItem( Menu,MSGTR_MENU_PlayList, evPlayList ); AddMenuItem( Menu,MSGTR_MENU_SkinBrowser, evSkinBrowser );
--- a/Gui/mplayer/gtk/opts.c Sat Jun 26 13:24:01 2004 +0000 +++ b/Gui/mplayer/gtk/opts.c Sat Jun 26 13:26:11 2004 +0000 @@ -171,7 +171,6 @@ static void prEntry( GtkContainer * container,gpointer user_data ); #endif -extern int muted; extern int stop_xscreensaver; void ShowPreferences( void )
--- a/Gui/mplayer/mw.c Sat Jun 26 13:24:01 2004 +0000 +++ b/Gui/mplayer/mw.c Sat Jun 26 13:26:11 2004 +0000 @@ -30,6 +30,8 @@ #include "play.h" #include "widgets.h" +extern mixer_t mixer; // mixer from mplayer.c + extern unsigned int GetTimerMS( void ); unsigned char * mplDrawBuffer = NULL; @@ -242,7 +244,7 @@ case evIncVolume: vo_x11_putkey( wsGrayMul ); break; case evDecVolume: vo_x11_putkey( wsGrayDiv ); break; - case evMute: mixer_mute(); break; + case evMute: mixer_mute( &mixer ); break; case evSetVolume: guiIntfStruct.Volume=param; @@ -256,7 +258,7 @@ if ( l > guiIntfStruct.Volume ) l=guiIntfStruct.Volume; if ( r > guiIntfStruct.Volume ) r=guiIntfStruct.Volume; // printf( "!!! v: %.2f b: %.2f -> %.2f x %.2f\n",guiIntfStruct.Volume,guiIntfStruct.Balance,l,r ); - mixer_setvolume( l,r ); + mixer_setvolume( &mixer,l,r ); } #ifdef USE_OSD if ( osd_level )