[xiph-cvs] cvs commit: snatch libsnatch.c snatch.pl x11.c
Monty
xiphmont at xiph.org
Fri Nov 9 22:50:44 PST 2001
xiphmont 01/11/09 22:50:44
Modified: . libsnatch.c snatch.pl x11.c
Log:
fixes continue
Revision Changes Path
1.10 +22 -3 snatch/libsnatch.c
Index: libsnatch.c
===================================================================
RCS file: /usr/local/cvsroot/snatch/libsnatch.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- libsnatch.c 2001/11/10 04:32:57 1.9
+++ libsnatch.c 2001/11/10 06:50:43 1.10
@@ -50,6 +50,7 @@
static int (*libc_ioctl)(int,int,void *);
static pid_t (*libc_fork)(void);
+static int (*xlib_xclose)(Display *);
static Display *(*xlib_xopen)(const char *);
static int (*xlib_xdrawsegments)(Display *,Drawable,GC,XSegment *,int);
static Window (*xlib_xcreatewindow)(Display *,Window,int,int,unsigned int,unsigned int,
@@ -278,6 +279,7 @@
libc_ioctl=get_me_symbol("ioctl");
libc_fork=get_me_symbol("fork");
xlib_xopen=get_me_symbol("XOpenDisplay");
+ xlib_xclose=get_me_symbol("XCloseDisplay");
xlib_xdrawsegments=get_me_symbol("XDrawSegments");
xlib_xcreatewindow=get_me_symbol("XCreateWindow");
xlib_xconfigurewindow=get_me_symbol("XConfigureWindow");
@@ -512,8 +514,10 @@
}
ssize_t write(int fd, const void *buf,size_t count){
+ int ret;
if(fd==audio_fd){
- fprintf(stderr,"audio");
+ // ret=((*libc_write)(fd,buf,count));
+ //return(ret);
if(fake_audiop)return(count);
}
@@ -549,14 +553,17 @@
va_end(optional);
if(fd==audio_fd){
+ fprintf(stderr,"ioctl %lx ",rq);
+
if(rq==SNDCTL_DSP_SPEED ||
rq==SNDCTL_DSP_CHANNELS ||
+ rq==SNDCTL_DSP_GETODELAY ||
rq==SNDCTL_DSP_SETFMT){
if(!fake_audiop)
ret=(*libc_ioctl)(fd,rq,arg);
-
- if(ret==0){
+
+ if(ret==0 || rq==SNDCTL_DSP_GETODELAY){
switch(rq){
case SNDCTL_DSP_SPEED:
audio_rate=*(int *)arg;
@@ -578,6 +585,18 @@
fprintf(stderr,
" ...: Audio output format set to %s.\n",
formatname(audio_format));
+ break;
+ case SNDCTL_DSP_GETODELAY: /* Must reject the ODELAY if we're not going to track
+ audio bytes and timing! */
+ {
+ int foo=*(int *)arg;
+ if(debug)
+ fprintf(stderr,
+ " ...: Audio output delay returned %d %d.\n",
+ ret,foo);
+ *(int *)arg=0;
+ ret=-1;
+ }
break;
}
}
1.18 +1 -1 snatch/snatch.pl
Index: snatch.pl
===================================================================
RCS file: /usr/local/cvsroot/snatch/snatch.pl,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- snatch.pl 2001/11/10 04:32:57 1.17
+++ snatch.pl 2001/11/10 06:50:43 1.18
@@ -969,7 +969,7 @@
ThrowRealPlayer();
}
- if($scalar=~/shut down X/){
+ if($scalar=~/X display closed/){
Disconnect();
$toplevel->fileevent(REAL_STDERR,'readable' => '');
Tk::exit(0);
1.13 +8 -4 snatch/x11.c
Index: x11.c
===================================================================
RCS file: /usr/local/cvsroot/snatch/x11.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- x11.c 2001/11/10 04:32:57 1.12
+++ x11.c 2001/11/10 06:50:43 1.13
@@ -495,7 +495,7 @@
int ret;
if(snatch_active==1 && id==rpvideo_window){
- fprintf(stderr,"putimage");
+
}
/* Subvert the Real sign on logo; paste the Snatch logo in.
@@ -630,11 +630,15 @@
dest_x, dest_y, width, height, send_event);
- fprintf(stderr,"shm");
-
if(snatch_active==1 && id==rpvideo_window){
- fprintf(stderr,"putimage");
+
}
+ return(ret);
+}
+
+int XCloseDisplay(Display *d){
+ int ret=(*xlib_xclose)(d);
+ if(debug)fprintf(stderr," ...: X display closed; goodbye.\n\n");
return(ret);
}
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list