comparison Gui/interface.c @ 12691:0230544f52a1

Fix GUI compilation, patch by Reimar Dffinger and Alexander Strasser.
author diego
date Sat, 26 Jun 2004 13:26:11 +0000
parents 9a495bdc3a1e
children eb0d3c1b6c6d
comparison
equal deleted inserted replaced
12690:bc34137bb0b0 12691:0230544f52a1
39 #include "../libmpdemux/stheader.h" 39 #include "../libmpdemux/stheader.h"
40 #include "../libmpcodecs/dec_video.h" 40 #include "../libmpcodecs/dec_video.h"
41 41
42 #include "../m_config.h" 42 #include "../m_config.h"
43 #include "../m_option.h" 43 #include "../m_option.h"
44
45 extern mixer_t mixer; // mixer from mplayer.c
44 46
45 guiInterface_t guiIntfStruct; 47 guiInterface_t guiIntfStruct;
46 int guiWinID=-1; 48 int guiWinID=-1;
47 49
48 char * gstrcat( char ** dest,char * src ) 50 char * gstrcat( char ** dest,char * src )
620 break; 622 break;
621 case guiSetVolume: 623 case guiSetVolume:
622 if ( audio_out ) 624 if ( audio_out )
623 { 625 {
624 float l,r; 626 float l,r;
625 mixer_getvolume( &l,&r ); 627 mixer_getvolume( &mixer,&l,&r );
626 guiIntfStruct.Volume=(r>l?r:l); 628 guiIntfStruct.Volume=(r>l?r:l);
627 if ( r != l ) guiIntfStruct.Balance=( ( r - l ) + 100 ) * 0.5f; 629 if ( r != l ) guiIntfStruct.Balance=( ( r - l ) + 100 ) * 0.5f;
628 else guiIntfStruct.Balance=50.0f; 630 else guiIntfStruct.Balance=50.0f;
629 btnModify( evSetVolume,guiIntfStruct.Volume ); 631 btnModify( evSetVolume,guiIntfStruct.Volume );
630 btnModify( evSetBalance,guiIntfStruct.Balance ); 632 btnModify( evSetBalance,guiIntfStruct.Balance );
649 651
650 // -- audio 652 // -- audio
651 if ( audio_out ) 653 if ( audio_out )
652 { 654 {
653 float l,r; 655 float l,r;
654 mixer_getvolume( &l,&r ); 656 mixer_getvolume( &mixer,&l,&r );
655 guiIntfStruct.Volume=(r>l?r:l); 657 guiIntfStruct.Volume=(r>l?r:l);
656 if ( r != l ) guiIntfStruct.Balance=( ( r - l ) + 100 ) * 0.5f; 658 if ( r != l ) guiIntfStruct.Balance=( ( r - l ) + 100 ) * 0.5f;
657 else guiIntfStruct.Balance=50.0f; 659 else guiIntfStruct.Balance=50.0f;
658 btnModify( evSetVolume,guiIntfStruct.Volume ); 660 btnModify( evSetVolume,guiIntfStruct.Volume );
659 btnModify( evSetBalance,guiIntfStruct.Balance ); 661 btnModify( evSetBalance,guiIntfStruct.Balance );