From 47aaab6ded97a0b0fd9da2917813d4c57e8534a8 Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Thu, 13 Jul 2000 13:32:27 +0000 Subject: - Update to version 2v2 PR: 19759 Submitted by: KATO Tsuguru --- audio/xwave/files/patch-ad | 120 +++++++++++++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 43 deletions(-) (limited to 'audio/xwave/files/patch-ad') diff --git a/audio/xwave/files/patch-ad b/audio/xwave/files/patch-ad index 14e682348226..7ddc80f2a60b 100644 --- a/audio/xwave/files/patch-ad +++ b/audio/xwave/files/patch-ad @@ -1,7 +1,5 @@ -$NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ - ---- xwave/src/audio.c.orig Wed Aug 12 23:27:09 1998 -+++ src/audio.c Sun Jun 11 13:35:54 2000 +--- src/audio.c.orig Mon Nov 9 08:22:55 1998 ++++ src/audio.c Fri Jun 30 19:49:15 2000 @@ -37,7 +37,7 @@ #ifdef linux #include @@ -29,25 +27,7 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ int set_dsp(int o_mode,int res, int channels, int freq, int *buf_size) { int check; -@@ -274,7 +274,7 @@ - } - #endif - --#ifdef sun -+#if defined(sun) - void check_audio(Main_Bool *mb) - /* test if there is a play device, and how fast we can play */ - { -@@ -307,7 +307,7 @@ - case AUDIO_ENCODING_LINEAR: - printf("ULAW\n");break; - default: -- printf("unknown encoding\n"); -+ printf("unknown encoding: %d\n",au_info.play.encoding); - } - close(audio); - } else { -@@ -370,7 +370,7 @@ +@@ -369,7 +369,7 @@ void play_file(char *fname,Main_Bool *mb) { @@ -56,7 +36,7 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ int audio; #elif defined(sgi) ALport port; -@@ -384,7 +384,7 @@ +@@ -383,7 +383,7 @@ return; } @@ -65,7 +45,7 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ if ((audio=set_dsp(O_WRONLY,af.bps,af.channels,af.freq,&buf_size))==-1) { fprintf(stderr,"XWave: Error ! Cannot set dsp !\n"); close(af.fd); -@@ -404,7 +404,7 @@ +@@ -403,7 +403,7 @@ if ((buffer=malloc(buf_size))==NULL) { fprintf(stderr,"XWave: Error ! Cannot alloc mem !\n"); close(af.fd); @@ -74,7 +54,7 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ close(audio); #elif defined(sgi) ALcloseport(port); -@@ -413,7 +413,7 @@ +@@ -412,7 +412,7 @@ return; } @@ -83,7 +63,61 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ while ((length=af_read(af,buffer,buf_size))>0) { if (write(audio, buffer, length)==-1) break; } -@@ -440,7 +440,7 @@ +@@ -439,7 +439,7 @@ + int offset=0,playlength,length; + #ifdef sgi + ALport port; +-#elif defined(linux) || defined (FreeBSD) || defined (sun) ++#elif defined(linux) || defined (__FreeBSD__) || defined (sun) + int audio; + + if ((audio=set_dsp(O_WRONLY,wd->res,wd->channels,wd->freq,&buf_size))==-1) { +@@ -472,7 +472,7 @@ + buffer=wd->buffer+offset; + while (playlength>0) { + if (playlength0) { + if (playlengthmg->fbuf,buf_size))==-1) { +-#if defined (linux) || defined (FreeBSD) || defined (sun) ++#if defined (linux) || defined (__FreeBSD__) || defined (sun) + close(audio); + #elif defined(sgi) + ALcloseport(port); +@@ -518,7 +518,7 @@ + kill((pid_t) getppid(),SIGUSR1); + return; + } +-#if defined (linux) || defined (FreeBSD) || defined (sun) ++#if defined (linux) || defined (__FreeBSD__) || defined (sun) + if (write(audio,(char*) md->mg->fbuf,length)==-1) { + close(audio); + kill((pid_t) getppid(),SIGUSR1); +@@ -537,7 +537,7 @@ + } + } + +-#if defined (linux) || defined (FreeBSD) || defined (sun) ++#if defined (linux) || defined (__FreeBSD__) || defined (sun) + close(audio); + #elif defined(sgi) + while (ALgetfilled(port)) sginap(2); +@@ -558,7 +558,7 @@ int offset=0,playlength,length; #ifdef sgi ALport port; @@ -92,52 +126,52 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ int audio; if ((audio=set_dsp(O_WRONLY,wd->res,wd->channels,wd->freq,&buf_size))==-1) { -@@ -473,7 +473,7 @@ - buffer=wd->buffer+offset; +@@ -593,7 +593,7 @@ + ((int *)shared_playpos)[0] = wd->playbeg*wd->bpspl; while (playlength>0) { if (playlength0) { +@@ -636,7 +636,7 @@ if (playlengthmg->fbuf,buf_size))==-1) { + ((int *)shared_playpos)[0] = -1; -#if defined (linux) || defined (FreeBSD) || defined (sun) +#if defined (linux) || defined (__FreeBSD__) || defined (sun) close(audio); #elif defined(sgi) ALcloseport(port); -@@ -518,7 +518,7 @@ +@@ -644,7 +644,7 @@ kill((pid_t) getppid(),SIGUSR1); return; } -#if defined (linux) || defined (FreeBSD) || defined (sun) +#if defined (linux) || defined (__FreeBSD__) || defined (sun) if (write(audio,(char*) md->mg->fbuf,length)==-1) { + ((int *)shared_playpos)[0] = -1; close(audio); - kill((pid_t) getppid(),SIGUSR1); -@@ -536,7 +536,7 @@ - } +@@ -666,7 +666,7 @@ } + ((int *)shared_playpos)[0] = -1; -#if defined (linux) || defined (FreeBSD) || defined (sun) +#if defined (linux) || defined (__FreeBSD__) || defined (sun) close(audio); #elif defined(sgi) while (ALgetfilled(port)) sginap(2); -@@ -556,7 +556,7 @@ +@@ -686,7 +686,7 @@ void write_length(); byte *data=NULL; int abuf_size,count; @@ -146,7 +180,7 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ int audio; if ((audio=set_dsp(O_RDONLY,res,mode,freq,&abuf_size))==-1) { -@@ -577,7 +577,7 @@ +@@ -707,7 +707,7 @@ if ((data = (byte *) malloc(abuf_size)) == NULL) { fprintf(stderr,"XWave: Error while alloc mem for audio_buffer !\n"); @@ -155,7 +189,7 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ close(audio); #elif defined(sgi) ALcloseport(port); -@@ -595,7 +595,7 @@ +@@ -725,7 +725,7 @@ if (af_open(fname,&af,AF_NEW)==AF_ERROR) { free(data); @@ -164,7 +198,7 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ close(audio); #elif defined(sgi) ALcloseport(port); -@@ -608,7 +608,7 @@ +@@ -738,7 +738,7 @@ signal(SIGUSR1,write_length); while(1) { @@ -173,7 +207,7 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ if ((count=read(audio, data, abuf_size))==-1) { close(audio); af_close(af); -@@ -632,7 +632,7 @@ +@@ -762,7 +762,7 @@ return; } if ((count=af_write(af,(char*)data,count))==AF_ERROR) { -- cgit v1.2.3