comparison Gui/mplayer/play.c @ 1743:b266f763cad3

fix playing
author pontscho
date Wed, 29 Aug 2001 15:07:40 +0000
parents d6c99f70449e
children e955ee46d3e0
comparison
equal deleted inserted replaced
1742:0880718750d5 1743:b266f763cad3
4 4
5 #include <unistd.h> 5 #include <unistd.h>
6 #include <signal.h> 6 #include <signal.h>
7 7
8 int mplParent = 1; 8 int mplParent = 1;
9
10 float gui_position=-1;
11 9
12 int mplx,mply,mplwidth,mplheight; 10 int mplx,mply,mplwidth,mplheight;
13 11
14 #include "../app.h" 12 #include "../app.h"
15 13
104 mplShMem=shmem_alloc( ShMemSize ); 102 mplShMem=shmem_alloc( ShMemSize );
105 #else 103 #else
106 mplShMem=calloc( 1,ShMemSize ); 104 mplShMem=calloc( 1,ShMemSize );
107 #endif 105 #endif
108 signal( SIGTYPE,mplMainSigHandler ); 106 signal( SIGTYPE,mplMainSigHandler );
109 signal( SIGCHLD,SIG_IGN ); 107 // signal( SIGCHLD,SIG_IGN );
110 108
111 mplShMem->Playing=0; 109 mplShMem->Playing=0;
112 mplShMem->Volume=0.0f; 110 mplShMem->Volume=0.0f;
113 mplShMem->Position=0.0f; 111 mplShMem->Position=0.0f;
114 mplShMem->Balance=50.0f; 112 mplShMem->Balance=50.0f;
122 // --- 120 // ---
123 } 121 }
124 122
125 float mplGetPosition( void ) 123 float mplGetPosition( void )
126 { // return 0.0 ... 100.0 124 { // return 0.0 ... 100.0
127 // return (gui_position<0)?(mplShMem->Position):(gui_position*100.0);
128 return mplShMem->Position; 125 return mplShMem->Position;
129 } 126 }
130 127
131 void mplRelSeek( float s ) 128 void mplRelSeek( float s )
132 { // -+s 129 { // -+s
133 // --- 130 // ---
134 printf("%%%%%% RelSEEK=%5.3f \n",s); 131 //printf("%%%%%% RelSEEK=%5.3f \n",s);
135 // --- 132 // ---
136 rel_seek_secs=s; abs_seek_pos=0; 133 rel_seek_secs=s; abs_seek_pos=0;
137 } 134 }
138 135
139 void mplAbsSeek( float s ) 136 void mplAbsSeek( float s )
140 { // 0.0 ... 100.0 137 { // 0.0 ... 100.0
141 // --- 138 // ---
142 printf("%%%%%% AbsSEEK=%5.3f \n",s); 139 //printf("%%%%%% AbsSEEK=%5.3f \n",s);
143 rel_seek_secs=0.01*s; abs_seek_pos=3; 140 rel_seek_secs=0.01*s; abs_seek_pos=3;
144 // --- 141 // ---
145 } 142 }
146 143
147 void mplIncAudioBufDelay( void ) 144 void mplIncAudioBufDelay( void )